{"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/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/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/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[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","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","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"]}},"/base/approval-policies":{"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"]},"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"]}},"/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"}]}},"/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"}]}},"/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/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/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}/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}":{"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/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"]},"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"]}},"/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_NOT_IN_ENTITY, 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_NOT_IN_ENTITY"},"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 opportunity's customer or prospect after the change."},"entityId":{"type":"string","description":"The opportunity's entity after the change."}},"additionalProperties":false,"required":["customerId","entityId"]}},"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_NOT_IN_ENTITY"},"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 opportunity's customer or prospect after the change."},"entityId":{"type":"string","description":"The opportunity's entity after the change."}},"additionalProperties":false,"required":["customerId","entityId"]}},"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_NOT_IN_ENTITY"},"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 opportunity's customer or prospect after the change."},"entityId":{"type":"string","description":"The opportunity's entity after the change."}},"additionalProperties":false,"required":["customerId","entityId"]}},"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: the customer must belong to the entity, a partner customer needs one of its end customers, and the stage must be an active stage of the entity. 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/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"]}},"/crm/opportunities":{"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_NOT_IN_ENTITY, 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_NOT_IN_ENTITY"},"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 customer or prospect you sent."},"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["customerId","entityId"]}},"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 you sent."}},"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_NOT_IN_ENTITY"},"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 customer or prospect you sent."},"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["customerId","entityId"]}},"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 you sent."}},"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_NOT_IN_ENTITY"},"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 customer or prospect you sent."},"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["customerId","entityId"]}},"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 you sent."}},"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. The customer must belong to entityId, and a partner customer also needs an endCustomerId, one of that partner's end customers. Without a stageId the opportunity starts in the entity's first stage; 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"]},"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"]}},"/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/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/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}/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/prospects/bulk":{"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"]},"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"]}},"/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":{"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"]}},"/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/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/sales-returns":{"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"]},"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"]}},"/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/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"]}},"/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/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/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/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"}]}},"/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/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"}]}},"/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/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/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/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.","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"]}},"/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/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/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/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: REFERENCE_NOT_FOUND, REFERENCE_NUMBER_NOT_UNIQUE, CROSS_CHARGE_INVALID, TOO_MANY_LINES, 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":"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":"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":"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_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":"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":"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/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/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/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/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"]},"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"]},"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"]}},"/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/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"]},"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"]},"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: 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":"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":"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":"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"]}},"/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: 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":"NOT_FOUND"},"message":{"type":"string"},"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":"NOT_FOUND"},"message":{"type":"string"},"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":"NOT_FOUND"},"message":{"type":"string"},"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/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/payroll-payments":{"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"]},"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"]}},"/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/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"]},"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"]},"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"]}},"/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/vendor-credits/{id}":{"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, 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":"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":"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":"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"]},"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"]}},"/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 and every expense item on it.\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: 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":"NOT_FOUND"},"message":{"type":"string"},"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":"NOT_FOUND"},"message":{"type":"string"},"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":"NOT_FOUND"},"message":{"type":"string"},"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.\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/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/vendor-bills/{id}":{"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"]},"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, and its approval decisions.\n\nPOST accounting/vendor-bills/search returns the same fields for each match, except approvals. GET accounting/vendor-bills returns the main fields only.","tags":["accountingVendorBills"]},"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, LINE_NOT_FOUND, ACCOUNT_ENTITY_MISMATCH, CROSS_CHARGE_INVALID, TOO_MANY_LINES, 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","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"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 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":"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":"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 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":"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":"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 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":"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":"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\nThe response is empty. To see the updated bill, use GET accounting/vendor-bills/:id.","tags":["accountingVendorBills"]}},"/accounting/purchase-requests":{"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: 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":"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":"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":"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. 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, 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"]},"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"]}},"/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: 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":"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":"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":"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/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 and its expense items. 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/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/{id}":{"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"]},"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"]},"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, 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":"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":"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":"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"]}},"/accounting/payroll-details":{"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: 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":"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":"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":"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"]},"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"]}},"/accounting/outbound-payments/{id}":{"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"]},"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"]}},"/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, 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":"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":"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 see the bill, including its vendorBillNumber, 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"]}},"/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/vendors/{id}":{"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"]},"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: NOT_FOUND, 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":"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already 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, 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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"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"]}},"/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/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"]}},"/accounting/expense-categories/{id}":{"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"]},"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"]},"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"]}},"/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/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[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","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: 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":"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":"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":"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/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/expense-reports":{"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: 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":"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":"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":"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"]},"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"]}},"/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/purchase-requests/{id}":{"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. 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"]},"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"]}},"/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/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"}]}},"/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"]}},"/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/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"]}},"/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/bank-transactions/{id}":{"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"]},"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"]}},"/banking/reconciliations":{"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"]},"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"]}},"/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/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"]}},"/banking/fund-transfers/{id}":{"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"]},"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"]}},"/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/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"]}},"/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[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","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/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"}]}},"/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, POSTING_PERIOD_NOT_OPEN, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, GROUPING_ACCOUNT_NOT_ALLOWED, BUSINESS_PARTNER_REQUIRED_FOR_VAT, 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":"NOT_FOUND"},"message":{"type":"string"},"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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/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/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/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"]}},"/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/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/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/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"]}},"/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/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/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.","tags":["accountingCreditMemos"]}},"/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"}]}},"/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/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"]}},"/people/skills/{id}":{"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"]},"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"]},"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/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/position-skill-requirements":{"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"]},"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"]}},"/people/skills/bulk":{"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"]},"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"]}},"/people/skill-categories":{"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"]},"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"]}},"/people/skill-categories/{id}":{"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"]},"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"]}},"/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/position-seniorities":{"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"]},"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"]}},"/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"]}},"/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/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/{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"]}},"/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"]},"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"]},"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"]}},"/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"}]}},"/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"]}},"/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"]}},"/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"]}},"/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"}]}},"/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":{"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"]}},"/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/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"]}},"/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"]}},"/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/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/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/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, POSTING_PERIOD_NOT_OPEN, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, GROUPING_ACCOUNT_NOT_ALLOWED, BUSINESS_PARTNER_REQUIRED_FOR_VAT, 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":"NOT_FOUND"},"message":{"type":"string"},"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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/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/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/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/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/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/{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/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/sales-order-shipments/{id}":{"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"]},"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"]},"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/{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/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"]}},"/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/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/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/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/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/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/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/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: REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, POSTING_PERIOD_NOT_OPEN, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, GROUPING_ACCOUNT_NOT_ALLOWED, BUSINESS_PARTNER_REQUIRED_FOR_VAT, 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":"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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":"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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":"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'."},"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."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"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":"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/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/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. 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/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/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/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/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/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/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/{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/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/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/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"]}},"summary":"A tax-exempt line — empty taxLines, not omitted"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a 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","content":{"application/json":{"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":"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":"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":"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"}}}}},"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\nIf any invoice can't be imported, none are. The response lists the new invoices' ids in the order you sent them. To read one, 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/{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"]}},"/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/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/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/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/books/{id}":{"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"]}},"/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/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"]}},"/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"]}},"/inventory/unit-of-measure-groups":{"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"]},"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"]}},"/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"}]}},"/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"]}},"/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 an intercompany transfer.","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"}},"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\nThe response has the same fields as GET inventory/warehouse-transfers/:id.","tags":["inventoryWarehouseTransfers"]}},"/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"]}},"/inventory/batch-numbers/{id}":{"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"]},"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"]}},"/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/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"]},"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"]},"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"]}},"/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"]}},"/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"]},"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"]},"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"]}},"/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"]}},"/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/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/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","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already 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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"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"]}},"/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"]}},"/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"]},"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"]},"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"]}},"/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"},"aVirtualLocation":{"value":{"data":{"id":"7b2f9d51-c084-4e37-a615-9d0e4728cb63","locationCode":"VIRT-QC","entityId":"81e8beb1-1415-4012-9012-8138580f43dc","entityName":"Acme GmbH","name":"Quality control hold","inventoryLocationType":"VIRTUAL_QC","isActive":true,"isPrimaryReceiving":false,"lastModifiedDate":"2026-05-12T09:30:01.000Z"}},"summary":"A staging location the system keeps for quality control; it has no 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"},"aVirtualLocation":{"value":"7b2f9d51-c084-4e37-a615-9d0e4728cb63"}}}],"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/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/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/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"]},"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"]},"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"]}},"/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/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/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/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"]}},"/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"}]}},"/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"}]}},"/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"]}},"/banking/reconciliations/{id}":{"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"]},"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"]}},"/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"]}},"/banking/reconciliations/{id}/in-transit/gl-transactions":{"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"]},"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"]}},"/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}/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"}]}},"/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"]}},"/banking/reconciliations/{id}/in-transit/bank-transactions":{"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"]},"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"]}},"/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"}]}},"/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/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"]}},"/banking/bank-rules":{"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"]},"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","content":{"application/json":{"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already 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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"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"]}},"/banking/bank-rules/{id}":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already 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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"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"]},"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"]}},"/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"]}},"/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.","tags":["taxDocumentManualTaxableDocuments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/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.","tags":["taxDocumentManualTaxableDocuments"]}},"/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.","tags":["taxDocumentManualTaxableDocuments"]}},"/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","content":{"application/json":{"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already 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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"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"]}},"/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/inventory-revaluations":{"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"]},"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"]}},"/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/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/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"]},"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"]},"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"]}},"/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"]}},"/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"]}},"/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/inventory-revaluations/{id}":{"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"]},"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"]}},"/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/reason-codes":{"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"]},"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"]}},"/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/inventory-increases/{id}":{"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"]},"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"]},"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"]}},"/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/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/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/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/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/items":{"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"]},"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"]}},"/inventory/item-attributes":{"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"]},"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"]}},"/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"]}},"/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"]}},"/people/documents":{"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"]},"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"]}},"/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/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,