{"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":{"/psa/allocations":{"get":{"operationId":"allocations","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[method]","in":"query","required":false,"description":"Filter method (equality)","schema":{"type":"string"}},{"name":"filter[method][ne]","in":"query","required":false,"description":"Filter method (ne)","schema":{"type":"string"}},{"name":"filter[method][gt]","in":"query","required":false,"description":"Filter method (gt)","schema":{"type":"string"}},{"name":"filter[method][gte]","in":"query","required":false,"description":"Filter method (gte)","schema":{"type":"string"}},{"name":"filter[method][lt]","in":"query","required":false,"description":"Filter method (lt)","schema":{"type":"string"}},{"name":"filter[method][lte]","in":"query","required":false,"description":"Filter method (lte)","schema":{"type":"string"}},{"name":"filter[method][in]","in":"query","required":false,"description":"Filter method (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[method][notIn]","in":"query","required":false,"description":"Filter method (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[method][between]","in":"query","required":false,"description":"Filter method (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[method][like]","in":"query","required":false,"description":"Filter method (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["startDate","-startDate","endDate","-endDate","totalHours","-totalHours","method","-method","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","startDate","endDate","totalHours","notes","method","memberId","employeeId","projectActivityId","projectPositionId","psaProjectId","memberName","memberPlaceholderName","projectActivityName","projectPositionName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/allocationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List allocations","description":"Lists allocations. The ids that link an allocation to other records (memberId, employeeId, projectActivityId, projectPositionId, and psaProjectId) are numeric, not UUIDs. You can't use them with the GET endpoints for team members, activities, positions, or projects.\n\nYou can't filter allocations by team member, project, or activity, and there is no search endpoint for allocations. To find one person's allocations, you have to read the whole list.","tags":["psa-allocations"]},"patch":{"operationId":"updateAllocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAllocationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAllocationsInput"}}}},"summary":"Bulk update allocations","description":"Updates multiple allocations in one request, with the fields you send. A field you leave out keeps its current value. To clear notes or workingDays, send null.\n\nTo reassign an allocation, send a new memberId. memberEmployeeId, memberPlaceholderId, and psaProjectId are ignored, and an allocation can't move to another project. Every update recalculates the allocation's daily entries from its dates, totalHours, method, and workingDays.\n\nIf any id matches no allocation, the request fails with NOT_FOUND and nothing is updated. The response is empty. Read an updated allocation with GET psa/allocations/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-allocations"]},"post":{"operationId":"createAllocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAllocationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAllocationsInput"}}}},"summary":"Bulk create allocations","description":"Creates multiple allocations in one request. Each allocation also gets daily planned-hours entries, spread over its working days. If any allocation can't be created, none are.\n\nThe response lists the new allocations' ids in the order you sent them. Read an allocation with GET psa/allocations/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-allocations"]}},"/psa/time-entries":{"patch":{"operationId":"updateTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_INVOICED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateTimeEntriesInput"}}}},"summary":"Update time entries","description":"Updates the hours or notes of time entries. A field you leave out keeps its current value. To clear notes, send an empty string.\n\nhours and notes are the only fields you can change. To move time to another date, position assignment, or activity, delete the time entry and create a new one. The status changes only through POST psa/time-entries/submit, POST psa/time-entries/approve, and POST psa/time-entries/reject.\n\nCorrecting an approved time entry resets its approval and returns it to 'draft', so it must be submitted and approved again. If any time entry can't be updated, none are.\n\nYou can't change an invoiced time entry. A time entry counts as invoiced when its status is 'submittedForInvoicing' or 'invoiced', or when invoicedHours has a value, so a time entry that is part-way through invoicing is refused too. The request fails with ENTRY_INVOICED.\n\nThe request also fails with a generic error when the team is not active, or when the correction breaks the project's time-tracking settings: required notes, no time on weekends or holidays, and limits on hours per day, week, and month for each team member.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]},"get":{"operationId":"timeEntries","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[date]","in":"query","required":false,"description":"Filter date (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[date][ne]","in":"query","required":false,"description":"Filter date (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[date][gt]","in":"query","required":false,"description":"Filter date (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[date][gte]","in":"query","required":false,"description":"Filter date (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[date][lt]","in":"query","required":false,"description":"Filter date (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[date][lte]","in":"query","required":false,"description":"Filter date (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[date][in]","in":"query","required":false,"description":"Filter date (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[date][notIn]","in":"query","required":false,"description":"Filter date (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[date][between]","in":"query","required":false,"description":"Filter date (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[submissionStatus]","in":"query","required":false,"description":"Filter submissionStatus (equality)","schema":{"type":"string"}},{"name":"filter[submissionStatus][ne]","in":"query","required":false,"description":"Filter submissionStatus (ne)","schema":{"type":"string"}},{"name":"filter[submissionStatus][gt]","in":"query","required":false,"description":"Filter submissionStatus (gt)","schema":{"type":"string"}},{"name":"filter[submissionStatus][gte]","in":"query","required":false,"description":"Filter submissionStatus (gte)","schema":{"type":"string"}},{"name":"filter[submissionStatus][lt]","in":"query","required":false,"description":"Filter submissionStatus (lt)","schema":{"type":"string"}},{"name":"filter[submissionStatus][lte]","in":"query","required":false,"description":"Filter submissionStatus (lte)","schema":{"type":"string"}},{"name":"filter[submissionStatus][in]","in":"query","required":false,"description":"Filter submissionStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionStatus][notIn]","in":"query","required":false,"description":"Filter submissionStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionStatus][between]","in":"query","required":false,"description":"Filter submissionStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[submissionStatus][like]","in":"query","required":false,"description":"Filter submissionStatus (like)","schema":{"type":"string"}},{"name":"filter[submissionDate]","in":"query","required":false,"description":"Filter submissionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][ne]","in":"query","required":false,"description":"Filter submissionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][gt]","in":"query","required":false,"description":"Filter submissionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][gte]","in":"query","required":false,"description":"Filter submissionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][lt]","in":"query","required":false,"description":"Filter submissionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][lte]","in":"query","required":false,"description":"Filter submissionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][in]","in":"query","required":false,"description":"Filter submissionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionDate][notIn]","in":"query","required":false,"description":"Filter submissionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionDate][between]","in":"query","required":false,"description":"Filter submissionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[month]","in":"query","required":false,"description":"Filter month (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[month][ne]","in":"query","required":false,"description":"Filter month (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[month][gt]","in":"query","required":false,"description":"Filter month (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[month][gte]","in":"query","required":false,"description":"Filter month (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[month][lt]","in":"query","required":false,"description":"Filter month (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[month][lte]","in":"query","required":false,"description":"Filter month (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[month][in]","in":"query","required":false,"description":"Filter month (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[month][notIn]","in":"query","required":false,"description":"Filter month (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[month][between]","in":"query","required":false,"description":"Filter month (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectActivityId]","in":"query","required":false,"description":"Filter projectActivityId (equality)","schema":{"type":"number"}},{"name":"filter[projectActivityId][ne]","in":"query","required":false,"description":"Filter projectActivityId (ne)","schema":{"type":"number"}},{"name":"filter[projectActivityId][gt]","in":"query","required":false,"description":"Filter projectActivityId (gt)","schema":{"type":"number"}},{"name":"filter[projectActivityId][gte]","in":"query","required":false,"description":"Filter projectActivityId (gte)","schema":{"type":"number"}},{"name":"filter[projectActivityId][lt]","in":"query","required":false,"description":"Filter projectActivityId (lt)","schema":{"type":"number"}},{"name":"filter[projectActivityId][lte]","in":"query","required":false,"description":"Filter projectActivityId (lte)","schema":{"type":"number"}},{"name":"filter[projectActivityId][in]","in":"query","required":false,"description":"Filter projectActivityId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityId][notIn]","in":"query","required":false,"description":"Filter projectActivityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityId][between]","in":"query","required":false,"description":"Filter projectActivityId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","date","-date","month","-month","hours","-hours","submissionStatus","-submissionStatus","submissionDate","-submissionDate","currency","-currency","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","date","hours","billableHours","nonBillableHours","internalValuableHours","internalNonValuableHours","invoicedHours","revenue","cost","currency","notes","submissionStatus","submissionDate","month","memberId","memberEmployeeId","memberEmployeeName","projectActivityId","projectActivityName","projectActivityCategory","projectPositionId","projectPositionName","psaProjectId","projectName","psaProjectStatus","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/timeEntriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","date":"2026-08-10","hours":"8","billableHours":"8","revenue":"1250.00","currency":"USD","submissionStatus":"draft","month":"2026-08-01","memberId":5001,"projectActivityId":7001,"psaProjectId":32341,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"4f0ad2e6-8c13-4b7a-9e52-6d81b30f7ac9","date":"2026-08-11","hours":"6.5","billableHours":"6.5","revenue":"1015.63","currency":"USD","submissionStatus":"pending","month":"2026-08-01","memberId":5001,"projectActivityId":7001,"psaProjectId":32341,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List time entries","description":"Lists time entries. Unless you are a super admin, the list includes only time entries on projects where you are a team member. It always leaves out time entries on archived projects and on projects whose status is 'Planning' or 'PlanningDraft'.\n\nYou can't filter by memberId, memberEmployeeId, projectPositionId, or psaProjectId, so there is no way to list one employee's time entries.","tags":["psa-time-entries"]},"post":{"operationId":"createTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ACTIVITY_NOT_FOUND, DUPLICATE_TIME_ENTRY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACTIVITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectActivityId":{"type":"number"}},"additionalProperties":false,"required":["projectActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TIME_ENTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"duplicates":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["already-exists","conflicting-hours-in-request"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["duplicates"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACTIVITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectActivityId":{"type":"number"}},"additionalProperties":false,"required":["projectActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TIME_ENTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"duplicates":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["already-exists","conflicting-hours-in-request"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["duplicates"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACTIVITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectActivityId":{"type":"number"}},"additionalProperties":false,"required":["projectActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TIME_ENTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"duplicates":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["already-exists","conflicting-hours-in-request"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["duplicates"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTimeEntriesInput"}}}},"summary":"Create time entries","description":"Creates time entries. New time entries start in the 'draft' status. If any time entry can't be created, none are. The request never changes or deletes existing time entries, so you can send it for a date that already has time entries for other activities.\n\nEach position assignment can have only one time entry per activity and date. If a time entry already exists for that memberId, activity, and date, the request fails with DUPLICATE_TIME_ENTRY. If you send the same time entry twice in one request, it is created once when the hours match, and the request fails with the same error when they differ.\n\nEach time entry's project comes from its projectActivityId unless you send psaProjectId. If the activity belongs to no project, the request fails with ACTIVITY_NOT_FOUND.\n\nThe request also fails when the project's team is not active, or when the time entries break the project's time-tracking settings: required notes, no time on weekends or holidays, and limits on hours per day, week, and month for each team member. These failures return a generic error, not a named error code.\n\nTo correct an existing time entry, use PATCH psa/time-entries.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/fixed-fees":{"get":{"operationId":"fixedFees","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[frequency]","in":"query","required":false,"description":"Filter frequency (equality)","schema":{"type":"string"}},{"name":"filter[frequency][ne]","in":"query","required":false,"description":"Filter frequency (ne)","schema":{"type":"string"}},{"name":"filter[frequency][gt]","in":"query","required":false,"description":"Filter frequency (gt)","schema":{"type":"string"}},{"name":"filter[frequency][gte]","in":"query","required":false,"description":"Filter frequency (gte)","schema":{"type":"string"}},{"name":"filter[frequency][lt]","in":"query","required":false,"description":"Filter frequency (lt)","schema":{"type":"string"}},{"name":"filter[frequency][lte]","in":"query","required":false,"description":"Filter frequency (lte)","schema":{"type":"string"}},{"name":"filter[frequency][in]","in":"query","required":false,"description":"Filter frequency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[frequency][notIn]","in":"query","required":false,"description":"Filter frequency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[frequency][between]","in":"query","required":false,"description":"Filter frequency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[frequency][like]","in":"query","required":false,"description":"Filter frequency (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","frequency","-frequency","currency","-currency","startDate","-startDate","endDate","-endDate","psaProjectId","-psaProjectId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","amount","currency","frequency","startDate","endDate","psaProjectId","salesOrderProductLineId","productId","productLineId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/fixedFeesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7c2e1b90-4a53-4f16-8de2-9b1035c7ef42","amount":"5000.00","currency":"USD","frequency":"Monthly","startDate":"2026-01-01","endDate":"2026-12-01","psaProjectId":32341,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"e1904a7d-62cb-4d38-b075-3fa8c6215de0","amount":"18000.00","currency":"EUR","frequency":"Once","startDate":"2026-03-01","endDate":"2026-03-01","psaProjectId":32355,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List fixed fees","description":"Lists fixed fees. Each fixed fee has both amount and currency, or neither. Both come from one money value.","tags":["psa-fixed-fees"]}},"/psa/project-types":{"get":{"operationId":"projectTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/projectTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","name":"Retainer","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","name":"Fixed Bid","lastModifiedDate":"2026-05-12T09:30:01.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List project types","description":"Lists project types. Project types can't be filtered by name, and no other endpoint finds a project type by name.","tags":["psa-project-types"]},"post":{"operationId":"createProjectType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createProjectTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createProjectTypeInput"}}}},"summary":"Create a project type","description":"Creates a project type. The response contains only the new project type's id. Read the project type with GET psa/project-types/:id.\n\nTo create several project types in one request, use POST psa/project-types/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-project-types"]}},"/psa/projects/bulk-restore":{"post":{"operationId":"restorePsaProjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/restorePsaProjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/restorePsaProjectsInput"}}}},"summary":"Restore projects","description":"Restores one or more archived projects. You can restore a project archived by DELETE psa/projects/:id or by POST psa/projects/bulk-delete without irreversible. A permanently deleted project can't be restored.\n\nRestoring a project also makes its team active again, until the project's endDate. A project whose endDate has passed comes back with an inactive team.\n\nIf any project can't be restored, none are. The response is empty.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-projects"]}},"/psa/expenses/summary":{"get":{"operationId":"getExpensesSummary","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getExpensesSummaryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: EMPLOYEE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"psaProjectId","in":"query","required":true,"schema":{"type":"number"},"description":"The id of the PSA project. It is the numeric key, not the UUID that GET psa/projects/:id takes.","example":32341},{"name":"pageCursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of expenses per page, between 1 and 200. Defaults to 50. The maximum is 200.","example":50}],"summary":"Retrieve a project's expenses and budgets","description":"Retrieves a project's expenses and budgets. The response also lists every budget defined for the project in expenseBudgets, and the default catch-all budget in defaultBudget, when one is set. Send the project's numeric psaProjectId in the query string.\n\nOnly the expenses array is paginated. budgetMappings covers only the expenses on the current page, and expenseBudgets is the same on every page. The cursor counts expenses from the start, so a page can skip or repeat an expense if expenses are added or removed between requests.\n\nWith only View permission on the project, you see only your own expenses. With Edit permission, you see all of the project's expenses.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200, minimum 1) and `pageCursor`, not `page[size]` and `page[cursor]`.\n- The response contains the records in `data.expenses` and the next page's cursor in `data.pagination.nextCursor`.\n- Apart from `psaProjectId`, it takes no filters.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["psa-expenses"]}},"/psa/placeholders/{id}":{"get":{"operationId":"getPlaceholder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPlaceholderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the placeholder you want to retrieve.","example":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"}],"summary":"Retrieve a placeholder","description":"Retrieves a placeholder.","tags":["psa-placeholders"]},"delete":{"operationId":"deletePlaceholder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePlaceholderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the placeholder you want to delete. Its project assignments are deleted with it, and this cannot be undone.","example":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"}],"summary":"Delete a placeholder","description":"Deletes a placeholder. Every position assignment for the placeholder is deleted too, with its allocations, time entries, and activity assignments. If any of those position assignments has been invoiced or has billed time, the request fails.","tags":["psa-placeholders"]},"patch":{"operationId":"updatePlaceholder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePlaceholderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NAME_REQUIRED, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the placeholder you want to update.","example":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePlaceholderInput"}}}},"summary":"Update a placeholder","description":"Updates a placeholder with the fields you send. A field you leave out keeps its current value.\n\nThe response is empty. Read the placeholder with GET psa/placeholders/:id.","tags":["psa-placeholders"]}},"/psa/milestones":{"get":{"operationId":"milestones","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[billable]","in":"query","required":false,"description":"Filter billable (equality)","schema":{"type":"boolean"}},{"name":"filter[billable][ne]","in":"query","required":false,"description":"Filter billable (ne)","schema":{"type":"boolean"}},{"name":"filter[billable][gt]","in":"query","required":false,"description":"Filter billable (gt)","schema":{"type":"boolean"}},{"name":"filter[billable][gte]","in":"query","required":false,"description":"Filter billable (gte)","schema":{"type":"boolean"}},{"name":"filter[billable][lt]","in":"query","required":false,"description":"Filter billable (lt)","schema":{"type":"boolean"}},{"name":"filter[billable][lte]","in":"query","required":false,"description":"Filter billable (lte)","schema":{"type":"boolean"}},{"name":"filter[billable][in]","in":"query","required":false,"description":"Filter billable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][notIn]","in":"query","required":false,"description":"Filter billable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][between]","in":"query","required":false,"description":"Filter billable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","status","-status","currency","-currency","dueDate","-dueDate","psaProjectId","-psaProjectId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","amount","currency","dueDate","status","billable","psaProjectId","invoiceId","productId","productLineId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/milestonesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","name":"Phase 1 delivery","amount":"15000.00","currency":"USD","dueDate":"2026-09-30","status":"pending","billable":true,"psaProjectId":32341,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"4f0ad2e6-8c13-4b7a-9e52-6d81b30f7ac9","name":"Phase 2 delivery","amount":"22500.00","currency":"USD","dueDate":"2026-12-15","status":"accomplished","billable":true,"psaProjectId":32341,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List milestones","description":"Lists milestones. The psaProjectId, invoiceId, productId, and productLineId on a milestone are numeric ids, not UUIDs, so you can't use them to read the project, invoice, product, or product line they point to.\n\nMilestones can't be filtered by name or description, and no other endpoint finds a milestone by name.","tags":["psa-milestones"]}},"/psa/team-members":{"get":{"operationId":"teamMembers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId]","in":"query","required":false,"description":"Filter employeeId (equality)","schema":{"type":"number"}},{"name":"filter[employeeId][ne]","in":"query","required":false,"description":"Filter employeeId (ne)","schema":{"type":"number"}},{"name":"filter[employeeId][gt]","in":"query","required":false,"description":"Filter employeeId (gt)","schema":{"type":"number"}},{"name":"filter[employeeId][gte]","in":"query","required":false,"description":"Filter employeeId (gte)","schema":{"type":"number"}},{"name":"filter[employeeId][lt]","in":"query","required":false,"description":"Filter employeeId (lt)","schema":{"type":"number"}},{"name":"filter[employeeId][lte]","in":"query","required":false,"description":"Filter employeeId (lte)","schema":{"type":"number"}},{"name":"filter[employeeId][in]","in":"query","required":false,"description":"Filter employeeId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][notIn]","in":"query","required":false,"description":"Filter employeeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][between]","in":"query","required":false,"description":"Filter employeeId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isTeamLead]","in":"query","required":false,"description":"Filter isTeamLead (equality)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][ne]","in":"query","required":false,"description":"Filter isTeamLead (ne)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][gt]","in":"query","required":false,"description":"Filter isTeamLead (gt)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][gte]","in":"query","required":false,"description":"Filter isTeamLead (gte)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][lt]","in":"query","required":false,"description":"Filter isTeamLead (lt)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][lte]","in":"query","required":false,"description":"Filter isTeamLead (lte)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][in]","in":"query","required":false,"description":"Filter isTeamLead (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isTeamLead][notIn]","in":"query","required":false,"description":"Filter isTeamLead (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isTeamLead][between]","in":"query","required":false,"description":"Filter isTeamLead (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["psaProjectId","-psaProjectId","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","psaProjectId","employeeId","isTeamLead","startDate","endDate","allocation","name","displayName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/teamMembersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List team members","description":"Lists team members. Each team member is one person on one PSA project's team. To find who fills which project position, use GET psa/team-member-positions.","tags":["psa-team-members"]}},"/psa/allocations/{id}":{"get":{"operationId":"getAllocation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAllocationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the allocation you want to retrieve.","example":"6f3c1f0e-6a2b-4d5e-9c11-2b7a8e4d0f13"}],"summary":"Retrieve an allocation","description":"Retrieves an allocation. The ids that link an allocation to other records (memberId, employeeId, projectActivityId, projectPositionId, and psaProjectId) are numeric, not UUIDs. You can't use them with the GET endpoints for team members, activities, positions, or projects.","tags":["psa-allocations"]}},"/psa/project-types/{id}":{"patch":{"operationId":"updateProjectType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateProjectTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project type you want to update.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateProjectTypeInput"}}}},"summary":"Update a project type","description":"Updates a project type with the fields you send. A field you leave out keeps its current value.\n\nIf another project type already has the name you send, the request fails with DUPLICATE_NAME.\n\nThe response is empty. Read the project type with GET psa/project-types/:id.","tags":["psa-project-types"]},"get":{"operationId":"getProjectType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getProjectTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project type you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a project type","description":"Retrieves a project type. There is no endpoint to find a project type by name.","tags":["psa-project-types"]},"delete":{"operationId":"deleteProjectType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteProjectTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PROJECT_TYPE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","name","projectNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","name","projectNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","name","projectNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project type you want to delete.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Delete a project type","description":"Deletes a project type. A project type that a project still uses can't be deleted, and the request fails with PROJECT_TYPE_IN_USE.\n\nThe response is empty.","tags":["psa-project-types"]}},"/psa/team-members/{id}":{"get":{"operationId":"getTeamMember","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTeamMemberOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the team-roster record you want to retrieve.","example":"5f2e1c40-9a3b-4d71-8e05-6b4c2d1a7f93"}],"summary":"Retrieve a team member","description":"Retrieves a team member. A team member is one person on one PSA project's team. The response does not include the person's position assignments. To get those, use GET psa/team-member-positions.","tags":["psa-team-members"]}},"/psa/team-member-positions":{"get":{"operationId":"teamMemberPositions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectPositionId]","in":"query","required":false,"description":"Filter projectPositionId (equality)","schema":{"type":"number"}},{"name":"filter[projectPositionId][ne]","in":"query","required":false,"description":"Filter projectPositionId (ne)","schema":{"type":"number"}},{"name":"filter[projectPositionId][gt]","in":"query","required":false,"description":"Filter projectPositionId (gt)","schema":{"type":"number"}},{"name":"filter[projectPositionId][gte]","in":"query","required":false,"description":"Filter projectPositionId (gte)","schema":{"type":"number"}},{"name":"filter[projectPositionId][lt]","in":"query","required":false,"description":"Filter projectPositionId (lt)","schema":{"type":"number"}},{"name":"filter[projectPositionId][lte]","in":"query","required":false,"description":"Filter projectPositionId (lte)","schema":{"type":"number"}},{"name":"filter[projectPositionId][in]","in":"query","required":false,"description":"Filter projectPositionId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectPositionId][notIn]","in":"query","required":false,"description":"Filter projectPositionId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectPositionId][between]","in":"query","required":false,"description":"Filter projectPositionId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[teamMemberId]","in":"query","required":false,"description":"Filter teamMemberId (equality)","schema":{"type":"number"}},{"name":"filter[teamMemberId][ne]","in":"query","required":false,"description":"Filter teamMemberId (ne)","schema":{"type":"number"}},{"name":"filter[teamMemberId][gt]","in":"query","required":false,"description":"Filter teamMemberId (gt)","schema":{"type":"number"}},{"name":"filter[teamMemberId][gte]","in":"query","required":false,"description":"Filter teamMemberId (gte)","schema":{"type":"number"}},{"name":"filter[teamMemberId][lt]","in":"query","required":false,"description":"Filter teamMemberId (lt)","schema":{"type":"number"}},{"name":"filter[teamMemberId][lte]","in":"query","required":false,"description":"Filter teamMemberId (lte)","schema":{"type":"number"}},{"name":"filter[teamMemberId][in]","in":"query","required":false,"description":"Filter teamMemberId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamMemberId][notIn]","in":"query","required":false,"description":"Filter teamMemberId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamMemberId][between]","in":"query","required":false,"description":"Filter teamMemberId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[placeholderId]","in":"query","required":false,"description":"Filter placeholderId (equality)","schema":{"type":"number"}},{"name":"filter[placeholderId][ne]","in":"query","required":false,"description":"Filter placeholderId (ne)","schema":{"type":"number"}},{"name":"filter[placeholderId][gt]","in":"query","required":false,"description":"Filter placeholderId (gt)","schema":{"type":"number"}},{"name":"filter[placeholderId][gte]","in":"query","required":false,"description":"Filter placeholderId (gte)","schema":{"type":"number"}},{"name":"filter[placeholderId][lt]","in":"query","required":false,"description":"Filter placeholderId (lt)","schema":{"type":"number"}},{"name":"filter[placeholderId][lte]","in":"query","required":false,"description":"Filter placeholderId (lte)","schema":{"type":"number"}},{"name":"filter[placeholderId][in]","in":"query","required":false,"description":"Filter placeholderId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[placeholderId][notIn]","in":"query","required":false,"description":"Filter placeholderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[placeholderId][between]","in":"query","required":false,"description":"Filter placeholderId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiced]","in":"query","required":false,"description":"Filter invoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[invoiced][ne]","in":"query","required":false,"description":"Filter invoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gt]","in":"query","required":false,"description":"Filter invoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gte]","in":"query","required":false,"description":"Filter invoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lt]","in":"query","required":false,"description":"Filter invoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lte]","in":"query","required":false,"description":"Filter invoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][in]","in":"query","required":false,"description":"Filter invoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][notIn]","in":"query","required":false,"description":"Filter invoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][between]","in":"query","required":false,"description":"Filter invoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["psaProjectId","-psaProjectId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","psaProjectId","projectPositionId","positionName","teamMemberId","placeholderId","invoiced","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/teamMemberPositionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List position assignments","description":"Lists position assignments. Each position assignment links one person or placeholder to one project position. For the people on a project's team regardless of position, use GET psa/team-members.","tags":["psa-team-members"]}},"/psa/projects/{id}":{"delete":{"operationId":"deletePsaProject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePsaProjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project you want to delete. The project is archived rather than permanently deleted. Use POST psa/projects/bulk-delete with irreversible to delete permanently. A project that has been invoiced (or has an invoiced milestone) cannot be archived; the call fails and the project is left unchanged.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Archive a project","description":"Archives a project. Archiving also makes the project's team inactive. POST psa/projects/bulk-restore brings an archived project back.\n\nThe response is empty. To delete a project permanently, use POST psa/projects/bulk-delete with irreversible set to true.","tags":["psa-projects"]},"patch":{"operationId":"updatePsaProject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePsaProjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project you want to update.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePsaProjectInput"}}}},"summary":"Update a project","description":"Updates a project with the fields you send. A field you leave out keeps its current value. To clear an optional field, send null. Null is ignored for teamStartDate, teamLeadIds, and projectSettings. A null teamEndDate removes the lock date, so time and expenses stay open indefinitely.\n\nUse the project's id, not its code or the numeric psaProjectId that other PSA endpoints return.\n\nA teamLeadIds list you send replaces the current team leads, and each employee in it is given the PSA manager permission role. The list can't be empty. While the project has a sales arrangement, customerId is set to null on every update, even when you don't send it.\n\nChanging or removing salesArrangementId fails with INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED when a linked position, milestone, or fixed fee has already been invoiced. An invoiced expense budget does not block the change. A successful change also removes the links between the project's positions, milestones, and fixed fees and their sales order product items, and between its expense budgets and their sales orders.\n\nThe response is empty. Read the project with GET psa/projects/:id.","tags":["psa-projects"]},"get":{"operationId":"getPsaProject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPsaProjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a project","description":"Retrieves a project. Use the project's id, not its code or the numeric psaProjectId that other PSA endpoints return.\n\nThe response includes the project's budget, team, sales arrangement, and revenue to date, and has the same fields as each project from GET psa/projects.\n\nThe request fails with NOT_FOUND for an archived project and for a project whose status is 'Planning' or 'PlanningDraft'. It also fails with NOT_FOUND when you are not a member of the project's team, unless you are a super admin.","tags":["psa-projects"]}},"/psa/time-entries/reject":{"post":{"operationId":"rejectTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_STATUS_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectTimeEntriesInput"}}}},"summary":"Reject time entries","description":"Rejects submitted time entries. Each time entry's status changes from 'pending' to 'rejected'. If any time entry isn't 'pending', the request fails with ENTRY_STATUS_INVALID and none are rejected.\n\nOnly the first time entry's rejectionReason is used, and that reason replaces the notes of every rejected time entry. The request fails if timeEntries is empty.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/time-entries/{id}":{"get":{"operationId":"getTimeEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTimeEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the time entry you want to retrieve.","example":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}],"summary":"Retrieve a time entry","description":"Retrieves a time entry. The response has the same fields as each time entry from GET psa/time-entries.\n\nSome time entries come back with fewer fields. That happens when the time entry's project is in the 'Planning' or 'PlanningDraft' status, or when you are not a team member of the project and not a super admin. The response then leaves out psaProjectId, projectName, psaProjectStatus, projectPositionId, projectPositionName, memberEmployeeId, memberEmployeeName, projectActivityName, billableHours, nonBillableHours, internalValuableHours, and internalNonValuableHours.","tags":["psa-time-entries"]}},"/psa/allocations/bulk-delete":{"post":{"operationId":"deleteAllocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAllocationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deleteAllocationsInput"}}}},"summary":"Bulk delete allocations","description":"Deletes multiple allocations in one request. Deleting an allocation also deletes its daily planned-hours entries, and you can't restore it. Logged time entries have no link to an allocation and are never affected.\n\nIf any id matches no allocation, the request fails with NOT_FOUND and nothing is deleted.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-allocations"]}},"/psa/expenses/budgets":{"get":{"operationId":"getExpenseBudgets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getExpenseBudgetsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"psaProjectId","in":"query","required":true,"schema":{"type":"number"},"description":"The id of the PSA project. It is the numeric key, not the UUID that GET psa/projects/:id takes.","example":32341},{"name":"isDefault","in":"query","required":false,"schema":{"type":"boolean"},"description":"When true, return only the project's default catch-all budget. When false or omitted, return all of the project's budgets. False does not filter to non-default budgets."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of budgets per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected.","example":50}],"summary":"List a project's expense budgets","description":"Lists the expense budgets defined for a PSA project. Send the project's numeric psaProjectId in the query string. You need view access to that project.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200, minimum 1) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response contains the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- Send `psaProjectId`, which is required. To get only the default budget, send `isDefault=true`.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["psa-expenses"]}},"/psa/team-members/assign-placeholder":{"post":{"operationId":"assignEmployeesToPlaceholders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/assignEmployeesToPlaceholdersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/assignEmployeesToPlaceholdersInput"}}}},"summary":"Replace placeholders with employees","description":"Replaces placeholders with employees. Each item moves one placeholder's position assignments to an employee. When the employee already has the same position, the placeholder's assignment is merged into the employee's and then removed. If any placeholder can't be replaced, none are.\n\nYou need edit permission on each project. The response lists the ids of the resulting position assignments. A merged assignment adds no id, so you can't match ids to items by their place in the list.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-team-members"]}},"/psa/team-member-positions/{id}":{"get":{"operationId":"getTeamMemberPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTeamMemberPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position assignment you want to retrieve.","example":"c81b0a52-7de4-4f16-9b32-0a5e8c7d4126"}],"summary":"Retrieve a position assignment","description":"Retrieves a position assignment. A position assignment links one person or placeholder to one project position. For the people on a project's team, use GET psa/team-members.","tags":["psa-team-members"]}},"/psa/fixed-fees/{id}":{"get":{"operationId":"getFixedFee","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getFixedFeeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fixed fee you want to retrieve.","example":"7c2e1b90-4a53-4f16-8de2-9b1035c7ef42"}],"summary":"Retrieve a fixed fee","description":"Retrieves a fixed fee. Each fixed fee has both amount and currency, or neither, because together they make one money value.","tags":["psa-fixed-fees"]}},"/base/custom-dimensions/{customDimensionUuid}/values":{"get":{"operationId":"listCustomDimensionValues","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listCustomDimensionValuesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customDimensionUuid":{"type":"string"}},"additionalProperties":false,"required":["customDimensionUuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customDimensionUuid":{"type":"string"}},"additionalProperties":false,"required":["customDimensionUuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"customDimensionUuid","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the custom value dimension whose values you want to retrieve. Take it from the customDimensionUuid of a record from GET base/custom-dimensions."},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether to include values that are no longer active. Defaults to false."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of values per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."}],"summary":"List a custom dimension's values","description":"Lists a custom dimension's values. Inactive values are left out unless `includeInactive` is `true`. Each value has the `modelUuid` that POST base/reporting-tags/resolve accepts.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- The only filter is `includeInactive`.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["baseReportingTags"]}},"/base/custom-dimensions":{"get":{"operationId":"listCustomDimensions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listCustomDimensionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of dimensions per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."}],"summary":"List custom dimensions","description":"Lists custom dimensions. A custom dimension is a reporting-tag category defined in your tenant, beyond the nine built-in ones such as department, region, and customer.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- It takes no filters.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.\n\nTo list the values inside one dimension, use GET base/custom-dimensions/:customDimensionUuid/values.","tags":["baseReportingTags"]}},"/base/reporting-tags/resolve":{"post":{"operationId":"resolveReportingTags","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/resolveReportingTagsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNSUPPORTED_DIMENSION_CODE, TOO_MANY_REFERENCES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string"},"supportedDimensionCodes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number"},"maximum":{"type":"number"}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string"},"supportedDimensionCodes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number"},"maximum":{"type":"number"}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/resolveReportingTagsInput"}}}},"summary":"Resolve reporting tag references","description":"Resolves reporting tag references into their display names. Each reference is a `dimensionCode` and `modelUuid` pair. A `modelUuid` is unique only within its dimension, so you need both to identify a tag.\n\nReferences that don't resolve are left out of the response, so match results by the pair, not by position. Send at most 100 references per request.\n\nUse it when you hold many references at once, such as the tags on a list of journal entries. It doesn't list tag values. To find a custom dimension's values, use GET base/custom-dimensions/:customDimensionUuid/values.","tags":["baseReportingTags"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/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","description":"Lists legal entities. 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}":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_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. 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/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/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/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/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","content":{"application/json":{"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already 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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"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/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, 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'."},"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":"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'."},"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":"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'."},"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":"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"}]}},"/inventory/shipments/{id}/commit":{"post":{"operationId":"commitShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"shipAndClose":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentStatus":"DELIVERED","journalEntryId":"6b2d90f1-4c37-4e85-a019-8d3f5c72b6e4","warnings":[]}},"summary":"A business that does not track transit closes the shipment in one call"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. 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, SOURCE_LINE_NOT_PROJECTED, MIXED_LOCATIONS, 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":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` 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 commit.","examples":{"shipAndClose":{"value":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitShipmentInput"},"examples":{"shipAndClose":{"value":{},"summary":"A business that does not track transit closes the shipment in one call"}}}}},"summary":"Ship and deliver a shipment","description":"Ships and delivers a shipment in one request. Moves a draft or packed shipment to 'DELIVERED': the stock leaves the warehouse and the cost of sale is recorded in a journal entry. The response gives the new status and, when a journal entry was created, its id in journalEntryId.\n\nEvery line must leave from the same warehouse. The check runs before any stock leaves or any journal entry is created, and a shipment with lines in more than one warehouse fails the request with MIXED_LOCATIONS.\n\nA delivered shipment can't be changed or deleted, and no endpoint cancels it.","tags":["inventoryShipments"]}},"/inventory/receipts/search":{"post":{"operationId":"searchReceipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchReceiptsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byDeliveryNote":{"value":{"data":{"items":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}],"pagination":{"hasMore":false}}},"summary":"The receipt behind a vendor's delivery note number — the question accounts payable asks"},"oneVendorsReceipts":{"value":{"data":{"items":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"COMMITTED","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T10:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}],"pagination":{"hasMore":false}}},"summary":"Everything received from one vendor this month"},"theUnpostedQueue":{"value":{"data":{"items":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}],"pagination":{"hasMore":false}}},"summary":"Every receipt still drafted and waiting to be posted"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchReceiptsInput"},"examples":{"byDeliveryNote":{"value":{"filters":{"referenceNumber":"DN-77120"}},"summary":"The receipt behind a vendor's delivery note number — the question accounts payable asks"},"oneVendorsReceipts":{"value":{"filters":{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Everything received from one vendor this month"},"theUnpostedQueue":{"value":{"filters":{"documentStatus":"DRAFT"}},"summary":"Every receipt still drafted and waiting to be posted"}}}}},"summary":"Search receipts","description":"Searches receipts. The response has each receipt in full: its lines with their batch, serial, and bin detail, and the same fields GET inventory/receipts/:id returns.\n\nThis is the only endpoint that filters by vendor, reference number, tracking number, item, or warehouse. The collection GET inventory/receipts has none of those filters and returns no lines.","tags":["inventoryReceipts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/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"},"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"},"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"},"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: 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":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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 are not accepted, so the item code and item type can't change.\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/warehouse-transfer-orders/{id}":{"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"]},"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, 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":"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"}},"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":"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"}},"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":"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"}},"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"]},"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/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"]}},"/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/inventory-increases":{"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[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","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"]},"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, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/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"]}},"/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, 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 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"]}},"/inventory/serial-transactions/{id}":{"get":{"operationId":"getSerialTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSerialTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aSerialReceipt":{"value":{"data":{"id":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"}},"summary":"One laptop received on a receipt."},"theSameUnitLeaving":{"value":{"data":{"id":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"8d17b4e2-3c95-4a60-b7f8-01e5d9c26a43","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-11","outQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-11T09:02:00.000Z"}},"summary":"The same laptop going out on a shipment eight days later."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the serial transaction you want to retrieve. Format: UUID.","examples":{"aSerialReceipt":{"value":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92"},"theSameUnitLeaving":{"value":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018"}}}],"summary":"Retrieve a serial transaction","description":"Retrieves a serial transaction.","tags":["inventorySerialTransactions"]}},"/inventory/purchase-returns/bulk":{"post":{"operationId":"bulkCreatePurchaseReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreatePurchaseReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, INCOMPLETE_LINE, MISSING_TRACKING_SELECTION, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","kind","itemId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","kind","itemId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","kind","itemId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreatePurchaseReturnsInput"}}}},"summary":"Bulk create purchase returns","description":"Creates multiple purchase returns in one request, each with the `documentStatus` 'DRAFT'. If one purchase return cannot be created, the request fails and no purchase returns are created.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryPurchaseReturns"]}},"/inventory/receipts/{id}/commit":{"post":{"operationId":"commitReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"postTheReceipt":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":[]}},"summary":"The goods are booked in and the accrual raised"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. 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, LOCATION_ENTITY_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the receipt you want to commit. Every line's warehouse must belong to the receipt's legal entity, or the commit is refused.","examples":{"postTheReceipt":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitReceiptInput"},"examples":{"postTheReceipt":{"value":{},"summary":"The goods are booked in and the accrual raised"}}}}},"summary":"Commit a receipt","description":"Commits a draft receipt, bringing the stock in. It also creates a journal entry for the goods received but not yet invoiced by the vendor. The response gives the receipt's new status and, when a journal entry was created, its id in journalEntryId.\n\nOnly Inventory lines create inventory transactions. Service and Expense lines go only into that journal entry.\n\nEvery line's warehouse must belong to the receipt's legal entity. Otherwise the request fails with LOCATION_ENTITY_MISMATCH.\n\nOther checks also run at commit. For example, all Inventory lines must use the same warehouse, a line received against a purchase order must not exceed that line's open quantity, account determination must find the general ledger accounts for the journal entry, and a batch- or serial-tracked line's batches or serials must add up to the line's quantity. If any of these checks fails, the request fails with POSTING_REJECTED and 'reason' gives the message.\n\nA committed receipt can't be changed or deleted, and no endpoint cancels it. A purchase return has no endpoint. To record money back from the vendor, use POST accounting/vendor-credits.","tags":["inventoryReceipts"]}},"/inventory/shipment-carriers/{id}":{"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"]},"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"]}},"/inventory/item-categories/bulk-delete":{"post":{"operationId":"bulkDeleteItemCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteItemCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ITEM_CATEGORY_IN_USE, ITEM_CATEGORY_HAS_CHILDREN","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteItemCategoriesInput"}}}},"summary":"Bulk delete item categories","description":"Deletes multiple item categories in one request. Every id is checked before anything is deleted. If any category can't be deleted, none are. A category can't be deleted while items or inventory transactions use it, or while it has categories beneath it.\n\nThe response lists each deleted category's id and name in the order you sent the ids.\n\nA category can't be deleted in the same request as the categories beneath it. Delete the lower categories first, in an earlier request.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItemCategories"]}},"/inventory/bins":{"get":{"operationId":"bins","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[binCode]","in":"query","required":false,"description":"Filter binCode (equality)","schema":{"type":"string"}},{"name":"filter[binCode][ne]","in":"query","required":false,"description":"Filter binCode (ne)","schema":{"type":"string"}},{"name":"filter[binCode][gt]","in":"query","required":false,"description":"Filter binCode (gt)","schema":{"type":"string"}},{"name":"filter[binCode][gte]","in":"query","required":false,"description":"Filter binCode (gte)","schema":{"type":"string"}},{"name":"filter[binCode][lt]","in":"query","required":false,"description":"Filter binCode (lt)","schema":{"type":"string"}},{"name":"filter[binCode][lte]","in":"query","required":false,"description":"Filter binCode (lte)","schema":{"type":"string"}},{"name":"filter[binCode][in]","in":"query","required":false,"description":"Filter binCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[binCode][notIn]","in":"query","required":false,"description":"Filter binCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[binCode][between]","in":"query","required":false,"description":"Filter binCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[binCode][like]","in":"query","required":false,"description":"Filter binCode (like)","schema":{"type":"string"}},{"name":"filter[barcode]","in":"query","required":false,"description":"Filter barcode (equality)","schema":{"type":"string"}},{"name":"filter[barcode][ne]","in":"query","required":false,"description":"Filter barcode (ne)","schema":{"type":"string"}},{"name":"filter[barcode][gt]","in":"query","required":false,"description":"Filter barcode (gt)","schema":{"type":"string"}},{"name":"filter[barcode][gte]","in":"query","required":false,"description":"Filter barcode (gte)","schema":{"type":"string"}},{"name":"filter[barcode][lt]","in":"query","required":false,"description":"Filter barcode (lt)","schema":{"type":"string"}},{"name":"filter[barcode][lte]","in":"query","required":false,"description":"Filter barcode (lte)","schema":{"type":"string"}},{"name":"filter[barcode][in]","in":"query","required":false,"description":"Filter barcode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[barcode][notIn]","in":"query","required":false,"description":"Filter barcode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[barcode][between]","in":"query","required":false,"description":"Filter barcode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[barcode][like]","in":"query","required":false,"description":"Filter barcode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[aisle]","in":"query","required":false,"description":"Filter aisle (equality)","schema":{"type":"string"}},{"name":"filter[aisle][ne]","in":"query","required":false,"description":"Filter aisle (ne)","schema":{"type":"string"}},{"name":"filter[aisle][gt]","in":"query","required":false,"description":"Filter aisle (gt)","schema":{"type":"string"}},{"name":"filter[aisle][gte]","in":"query","required":false,"description":"Filter aisle (gte)","schema":{"type":"string"}},{"name":"filter[aisle][lt]","in":"query","required":false,"description":"Filter aisle (lt)","schema":{"type":"string"}},{"name":"filter[aisle][lte]","in":"query","required":false,"description":"Filter aisle (lte)","schema":{"type":"string"}},{"name":"filter[aisle][in]","in":"query","required":false,"description":"Filter aisle (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[aisle][notIn]","in":"query","required":false,"description":"Filter aisle (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[aisle][between]","in":"query","required":false,"description":"Filter aisle (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[aisle][like]","in":"query","required":false,"description":"Filter aisle (like)","schema":{"type":"string"}},{"name":"filter[rack]","in":"query","required":false,"description":"Filter rack (equality)","schema":{"type":"string"}},{"name":"filter[rack][ne]","in":"query","required":false,"description":"Filter rack (ne)","schema":{"type":"string"}},{"name":"filter[rack][gt]","in":"query","required":false,"description":"Filter rack (gt)","schema":{"type":"string"}},{"name":"filter[rack][gte]","in":"query","required":false,"description":"Filter rack (gte)","schema":{"type":"string"}},{"name":"filter[rack][lt]","in":"query","required":false,"description":"Filter rack (lt)","schema":{"type":"string"}},{"name":"filter[rack][lte]","in":"query","required":false,"description":"Filter rack (lte)","schema":{"type":"string"}},{"name":"filter[rack][in]","in":"query","required":false,"description":"Filter rack (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[rack][notIn]","in":"query","required":false,"description":"Filter rack (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[rack][between]","in":"query","required":false,"description":"Filter rack (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[rack][like]","in":"query","required":false,"description":"Filter rack (like)","schema":{"type":"string"}},{"name":"filter[zone]","in":"query","required":false,"description":"Filter zone (equality)","schema":{"type":"string"}},{"name":"filter[zone][ne]","in":"query","required":false,"description":"Filter zone (ne)","schema":{"type":"string"}},{"name":"filter[zone][gt]","in":"query","required":false,"description":"Filter zone (gt)","schema":{"type":"string"}},{"name":"filter[zone][gte]","in":"query","required":false,"description":"Filter zone (gte)","schema":{"type":"string"}},{"name":"filter[zone][lt]","in":"query","required":false,"description":"Filter zone (lt)","schema":{"type":"string"}},{"name":"filter[zone][lte]","in":"query","required":false,"description":"Filter zone (lte)","schema":{"type":"string"}},{"name":"filter[zone][in]","in":"query","required":false,"description":"Filter zone (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[zone][notIn]","in":"query","required":false,"description":"Filter zone (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[zone][between]","in":"query","required":false,"description":"Filter zone (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[zone][like]","in":"query","required":false,"description":"Filter zone (like)","schema":{"type":"string"}},{"name":"filter[isPickingBin]","in":"query","required":false,"description":"Filter isPickingBin (equality)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][ne]","in":"query","required":false,"description":"Filter isPickingBin (ne)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][gt]","in":"query","required":false,"description":"Filter isPickingBin (gt)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][gte]","in":"query","required":false,"description":"Filter isPickingBin (gte)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][lt]","in":"query","required":false,"description":"Filter isPickingBin (lt)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][lte]","in":"query","required":false,"description":"Filter isPickingBin (lte)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][in]","in":"query","required":false,"description":"Filter isPickingBin (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPickingBin][notIn]","in":"query","required":false,"description":"Filter isPickingBin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPickingBin][between]","in":"query","required":false,"description":"Filter isPickingBin (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isReceivingBin]","in":"query","required":false,"description":"Filter isReceivingBin (equality)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][ne]","in":"query","required":false,"description":"Filter isReceivingBin (ne)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][gt]","in":"query","required":false,"description":"Filter isReceivingBin (gt)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][gte]","in":"query","required":false,"description":"Filter isReceivingBin (gte)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][lt]","in":"query","required":false,"description":"Filter isReceivingBin (lt)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][lte]","in":"query","required":false,"description":"Filter isReceivingBin (lte)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][in]","in":"query","required":false,"description":"Filter isReceivingBin (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReceivingBin][notIn]","in":"query","required":false,"description":"Filter isReceivingBin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReceivingBin][between]","in":"query","required":false,"description":"Filter isReceivingBin (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isProductionBin]","in":"query","required":false,"description":"Filter isProductionBin (equality)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][ne]","in":"query","required":false,"description":"Filter isProductionBin (ne)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][gt]","in":"query","required":false,"description":"Filter isProductionBin (gt)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][gte]","in":"query","required":false,"description":"Filter isProductionBin (gte)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][lt]","in":"query","required":false,"description":"Filter isProductionBin (lt)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][lte]","in":"query","required":false,"description":"Filter isProductionBin (lte)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][in]","in":"query","required":false,"description":"Filter isProductionBin (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isProductionBin][notIn]","in":"query","required":false,"description":"Filter isProductionBin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isProductionBin][between]","in":"query","required":false,"description":"Filter isProductionBin (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[capacityCheckMode]","in":"query","required":false,"description":"Filter capacityCheckMode (equality)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][ne]","in":"query","required":false,"description":"Filter capacityCheckMode (ne)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][gt]","in":"query","required":false,"description":"Filter capacityCheckMode (gt)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][gte]","in":"query","required":false,"description":"Filter capacityCheckMode (gte)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][lt]","in":"query","required":false,"description":"Filter capacityCheckMode (lt)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][lte]","in":"query","required":false,"description":"Filter capacityCheckMode (lte)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][in]","in":"query","required":false,"description":"Filter capacityCheckMode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[capacityCheckMode][notIn]","in":"query","required":false,"description":"Filter capacityCheckMode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[capacityCheckMode][between]","in":"query","required":false,"description":"Filter capacityCheckMode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[capacityCheckMode][like]","in":"query","required":false,"description":"Filter capacityCheckMode (like)","schema":{"type":"string"}},{"name":"filter[tempZone]","in":"query","required":false,"description":"Filter tempZone (equality)","schema":{"type":"string"}},{"name":"filter[tempZone][ne]","in":"query","required":false,"description":"Filter tempZone (ne)","schema":{"type":"string"}},{"name":"filter[tempZone][gt]","in":"query","required":false,"description":"Filter tempZone (gt)","schema":{"type":"string"}},{"name":"filter[tempZone][gte]","in":"query","required":false,"description":"Filter tempZone (gte)","schema":{"type":"string"}},{"name":"filter[tempZone][lt]","in":"query","required":false,"description":"Filter tempZone (lt)","schema":{"type":"string"}},{"name":"filter[tempZone][lte]","in":"query","required":false,"description":"Filter tempZone (lte)","schema":{"type":"string"}},{"name":"filter[tempZone][in]","in":"query","required":false,"description":"Filter tempZone (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[tempZone][notIn]","in":"query","required":false,"description":"Filter tempZone (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[tempZone][between]","in":"query","required":false,"description":"Filter tempZone (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[tempZone][like]","in":"query","required":false,"description":"Filter tempZone (like)","schema":{"type":"string"}},{"name":"filter[supportsPerishable]","in":"query","required":false,"description":"Filter supportsPerishable (equality)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][ne]","in":"query","required":false,"description":"Filter supportsPerishable (ne)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][gt]","in":"query","required":false,"description":"Filter supportsPerishable (gt)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][gte]","in":"query","required":false,"description":"Filter supportsPerishable (gte)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][lt]","in":"query","required":false,"description":"Filter supportsPerishable (lt)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][lte]","in":"query","required":false,"description":"Filter supportsPerishable (lte)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][in]","in":"query","required":false,"description":"Filter supportsPerishable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[supportsPerishable][notIn]","in":"query","required":false,"description":"Filter supportsPerishable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[supportsPerishable][between]","in":"query","required":false,"description":"Filter supportsPerishable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","binCode","-binCode","aisle","-aisle","rack","-rack","shelfLevel","-shelfLevel","active","-active","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","binCode","barcode","locationId","locationCode","locationName","aisle","rack","shelfLevel","zone","itemPosition","isPickingBin","isReceivingBin","isProductionBin","maxQuantity","maxWeight","maxWeightUnit","maxVolume","maxVolumeUnit","capacityCheckMode","tempZone","tempMin","tempMax","supportsPerishable","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/binsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"2b6f81d4-9e07-4a53-8c16-70d9a4e2f318","binCode":"C-02-3","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","zone":"Chilled","tempZone":"Chilled","tempMin":"2","tempMax":"8","supportsPerishable":true,"capacityCheckMode":"SoftWarning","active":true,"lastModifiedDate":"2026-08-18T09:16:41.220Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List bins","description":"Lists bins. Each bin comes back with its layout, limits, and settings, but not capacity. Only GET inventory/bins/:id returns capacity.\n\nSort on aisle, rack, and shelfLevel to list the bins in warehouse layout order.\n\nTo find bins that have no capacity limit, use POST inventory/bins/search.","tags":["inventoryBins"]},"post":{"operationId":"createBin","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBinOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"chilled":{"value":{"data":{"id":"2b6f81d4-9e07-4a53-8c16-70d9a4e2f318","binCode":"C-02-3"}},"summary":"A chilled bin for perishable stock"},"pickingBin":{"value":{"data":{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1"}},"summary":"A picking bin with a weight limit that will actually be enforced"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DUPLICATE_CODE, WAREHOUSE_NOT_BIN_TRACKABLE, UNKNOWN_VALUE, INCOMPLETE_LIMIT, NON_POSITIVE_LIMIT, INVALID_RANGE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBinInput"},"examples":{"chilled":{"value":{"binCode":"C-02-3","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","zone":"Chilled","tempZone":"Chilled","tempMin":"2","tempMax":"8","supportsPerishable":true,"capacityCheckMode":"SoftWarning"},"summary":"A chilled bin for perishable stock"},"pickingBin":{"value":{"binCode":"A-01-1","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock"},"summary":"A picking bin with a weight limit that will actually be enforced"}}}}},"summary":"Create a bin","description":"Creates a bin. The bin belongs to one warehouse. The response is the bin's id and binCode.\n\nA warehouse must be given its bins before any stock moves in it. Once a warehouse has inventory transactions that recorded no bin, no bin can be created for it, and the request fails with WAREHOUSE_NOT_BIN_TRACKABLE.\n\nThat warehouse can never become bin-tracked. A warehouse that already has a bin can always have more.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryBins"]}},"/inventory/landed-costs/search":{"post":{"operationId":"searchLandedCosts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchLandedCostsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byReceipt":{"value":{"data":{"items":[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","currency":"GBP","totalChargeAmount":"240","receiptCount":1,"chargeCount":1,"allocationLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","receipts":[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","quantity":"40","unitPrice":"12","lineTotal":"480"}]}],"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}],"allocationLines":[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]}],"pagination":{"hasMore":false}}},"summary":"Landed costs that include one receipt."},"openDrafts":{"value":{"data":{"items":[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","currency":"GBP","totalChargeAmount":"240","receiptCount":1,"chargeCount":1,"allocationLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","receipts":[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","quantity":"40","unitPrice":"12","lineTotal":"480"}]}],"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}],"allocationLines":[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]}],"pagination":{"hasMore":false}}},"summary":"Landed costs that are still drafts."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchLandedCostsInput"},"examples":{"byReceipt":{"value":{"filters":{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}},"summary":"Landed costs that include one receipt."},"openDrafts":{"value":{"filters":{"documentStatus":"DRAFT"},"page":{"size":50}},"summary":"Landed costs that are still drafts."}}}}},"summary":"Search landed costs","description":"Searches landed costs, with their receipts, charges, and allocation.","tags":["inventoryLandedCosts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/unit-of-measures":{"get":{"operationId":"unitOfMeasures","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[unitCode]","in":"query","required":false,"description":"Filter unitCode (equality)","schema":{"type":"string"}},{"name":"filter[unitCode][ne]","in":"query","required":false,"description":"Filter unitCode (ne)","schema":{"type":"string"}},{"name":"filter[unitCode][gt]","in":"query","required":false,"description":"Filter unitCode (gt)","schema":{"type":"string"}},{"name":"filter[unitCode][gte]","in":"query","required":false,"description":"Filter unitCode (gte)","schema":{"type":"string"}},{"name":"filter[unitCode][lt]","in":"query","required":false,"description":"Filter unitCode (lt)","schema":{"type":"string"}},{"name":"filter[unitCode][lte]","in":"query","required":false,"description":"Filter unitCode (lte)","schema":{"type":"string"}},{"name":"filter[unitCode][in]","in":"query","required":false,"description":"Filter unitCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitCode][notIn]","in":"query","required":false,"description":"Filter unitCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitCode][between]","in":"query","required":false,"description":"Filter unitCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitCode][like]","in":"query","required":false,"description":"Filter unitCode (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","unitCode","-unitCode","unitName","-unitName","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","unitCode","unitName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/unitOfMeasuresRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"KG","unitName":"Kilogram","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"EA","unitName":"Each","lastModifiedDate":"2026-05-12T09:30:01.000Z"},{"id":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b","unitCode":"L","unitName":"Litre","lastModifiedDate":"2026-05-12T09:30:02.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List units of measure","description":"Lists units of measure. The response gives each unit of measure's code and display name. The fields are the same as on GET inventory/unit-of-measures/:id and POST inventory/unit-of-measures/search.","tags":["inventoryUnitOfMeasures"]},"post":{"operationId":"createUnitOfMeasure","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createUnitOfMeasureOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}},"summary":"A weight unit"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_UNIT_CODE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createUnitOfMeasureInput"},"examples":{"basic":{"value":{"unitCode":"KG","unitName":"Kilogram"},"summary":"A weight unit"}}}}},"summary":"Create a unit of measure","description":"Creates a unit of measure. A unit of measure has a code, unique within the tenant, and a display name.\n\nThe response contains only the new unit of measure's id. To read the record, use GET inventory/unit-of-measures/:id. To create several at once, use POST inventory/unit-of-measures/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasures"]}},"/inventory/warehouse-transfer-orders":{"get":{"operationId":"warehouseTransferOrders","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[targetLocationId]","in":"query","required":false,"description":"Filter targetLocationId (equality)","schema":{"type":"string"}},{"name":"filter[targetLocationId][ne]","in":"query","required":false,"description":"Filter targetLocationId (ne)","schema":{"type":"string"}},{"name":"filter[targetLocationId][gt]","in":"query","required":false,"description":"Filter targetLocationId (gt)","schema":{"type":"string"}},{"name":"filter[targetLocationId][gte]","in":"query","required":false,"description":"Filter targetLocationId (gte)","schema":{"type":"string"}},{"name":"filter[targetLocationId][lt]","in":"query","required":false,"description":"Filter targetLocationId (lt)","schema":{"type":"string"}},{"name":"filter[targetLocationId][lte]","in":"query","required":false,"description":"Filter targetLocationId (lte)","schema":{"type":"string"}},{"name":"filter[targetLocationId][in]","in":"query","required":false,"description":"Filter targetLocationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[targetLocationId][notIn]","in":"query","required":false,"description":"Filter targetLocationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[targetLocationId][between]","in":"query","required":false,"description":"Filter targetLocationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[targetLocationId][like]","in":"query","required":false,"description":"Filter targetLocationId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","documentStatus","-documentStatus","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","referenceNumber","entityId","entityName","locationId","locationCode","locationName","targetLocationId","targetLocationCode","targetLocationName","notes","lineCount","openLineCount","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/warehouseTransferOrdersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38","documentNumber":"WTO-1043","documentStatus":"DRAFT","documentDate":"2026-08-18","locationCode":"WH-CENTRAL","targetLocationCode":"WH-NORTH","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"5d3a91b8-2e46-4f07-b19c-8a2f6d40e735","documentNumber":"WTO-1042","documentStatus":"PROCESSED","documentDate":"2026-08-17","locationCode":"WH-CENTRAL","targetLocationCode":"WH-SOUTH","lineCount":3,"openLineCount":0,"lastModifiedDate":"2026-08-17T16:41:09.220Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List warehouse transfer orders","description":"Lists warehouse transfer orders. Each order comes back without its lines, with lineCount and openLineCount instead. Every other field matches GET inventory/warehouse-transfer-orders/:id.\n\nlocationId and targetLocationId are the order's overall source and destination. A line can name its own warehouses, which only GET inventory/warehouse-transfer-orders/:id and POST inventory/warehouse-transfer-orders/search return.\n\nTo filter by item, use POST inventory/warehouse-transfer-orders/search.","tags":["inventoryWarehouseTransferOrders"]},"post":{"operationId":"createTransferOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTransferOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"twoWarehouses":{"value":{"data":{"id":"7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38","documentNumber":"WTO-1043","documentStatus":"DRAFT","documentDate":"2026-08-18","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"40","inventoryQuantity":"40","openQuantity":"40","status":"DRAFT"}]}},"summary":"A replenishment moving stock from the central warehouse to a depot"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, HEADER_SAME_LOCATION, HEADER_ENTITY_MISMATCH, ENTITY_MISMATCH","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["field","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"}},"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":"REFERENCE_NOT_FOUND"},"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"}},"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":"REFERENCE_NOT_FOUND"},"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"}},"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}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTransferOrderInput"},"examples":{"twoWarehouses":{"value":{"documentDate":"2026-08-18","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","referenceNumber":"REPLEN-2026-33","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"40"}]},"summary":"A replenishment moving stock from the central warehouse to a depot"}}}}},"summary":"Create a warehouse transfer order","description":"Creates a warehouse transfer order as a draft. An order is a request to move a quantity of items between warehouses. Nothing moves until POST inventory/warehouse-transfer-orders/:id/commit turns the order into a warehouse transfer.\n\nEvery line names the warehouse to draw from and the warehouse to deliver to. The two must differ and belong to the same legal entity, or the request fails with SAME_LOCATION or ENTITY_MISMATCH. The order's own locationId and targetLocationId are its overall source and destination. A line can name its own source and destination, so one order can draw from several warehouses.\n\nThe response has the same fields as GET inventory/warehouse-transfer-orders/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransferOrders"]}},"/inventory/landed-cost-items/search":{"post":{"operationId":"searchLandedCostItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchLandedCostItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"weightBased":{"value":{"data":{"items":[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Weight","costingElementTypeId":"c4a90e21-7b35-4d18-9e02-6f13a85c7d40","costingElementTypeCode":"FRT","costingElementTypeName":"Freight","active":true,"createdDate":"2026-08-01T11:02:19.880Z","lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Active landed cost items allocated by 'Weight', which need a weight on every received item."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchLandedCostItemsInput"},"examples":{"weightBased":{"value":{"filters":{"allocationMode":"Weight","active":true},"page":{"size":50}},"summary":"Active landed cost items allocated by 'Weight', which need a weight on every received item."}}}}},"summary":"Search landed cost items","description":"Searches landed cost items, with the names of their items, accounts, and costing element types.","tags":["inventoryLandedCostItems"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/warehouse-transfers":{"post":{"operationId":"createWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"anIntercompanySale":{"value":{"data":{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentNumber":"WTR-2291","documentStatus":"DRAFT","documentDate":"2026-08-18","transferType":"INTERCOMPANY","locationCode":"WH-CENTRAL","targetLocationCode":"WH-NORTH","currency":"EUR","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"7d2b48e1-95c3-4a06-8f17-3e5a9c06b2d4","itemCode":"WIDGET-01","quantity":"24","inventoryQuantity":"24","unitTransferValue":"22","totalTransferValue":"528"}],"toEntityId":"3d81b5f0-9c24-4e67-a015-7b2e8d3c9014","contractualCurrency":"EUR","billingStatus":"NOT_BILLED"}},"summary":"Moving goods to another legal entity, priced for the bill that follows"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, INTERCOMPANY_CONFIG_MISSING, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createWarehouseTransferInput"},"examples":{"anIntercompanySale":{"value":{"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","documentDate":"2026-08-18","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"24","unitTransferValue":"22"}],"transferType":"INTERCOMPANY","toEntityId":"3d81b5f0-9c24-4e67-a015-7b2e8d3c9014","contractualCurrency":"EUR"},"summary":"Moving goods to another legal entity, priced for the bill that follows"}}}}},"summary":"Create a warehouse transfer","description":"Creates a warehouse transfer as a draft. A transfer moves items from one warehouse to another. Nothing moves until you commit the transfer with POST inventory/warehouse-transfers/:id/commit.\n\nThe source and target warehouses are set once, on the transfer, and apply to every line. They must be different warehouses.\n\nAn intercompany transfer, with transferType 'INTERCOMPANY', also needs toEntityId, contractualCurrency and a unitTransferValue on every line. These are checked here, so a missing one fails before anything is written rather than at commit.\n\nThe response has the same fields as GET inventory/warehouse-transfers/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransfers"]},"get":{"operationId":"warehouseTransfers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[transferType]","in":"query","required":false,"description":"Filter transferType (equality)","schema":{"type":"string"}},{"name":"filter[transferType][ne]","in":"query","required":false,"description":"Filter transferType (ne)","schema":{"type":"string"}},{"name":"filter[transferType][gt]","in":"query","required":false,"description":"Filter transferType (gt)","schema":{"type":"string"}},{"name":"filter[transferType][gte]","in":"query","required":false,"description":"Filter transferType (gte)","schema":{"type":"string"}},{"name":"filter[transferType][lt]","in":"query","required":false,"description":"Filter transferType (lt)","schema":{"type":"string"}},{"name":"filter[transferType][lte]","in":"query","required":false,"description":"Filter transferType (lte)","schema":{"type":"string"}},{"name":"filter[transferType][in]","in":"query","required":false,"description":"Filter transferType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transferType][notIn]","in":"query","required":false,"description":"Filter transferType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transferType][between]","in":"query","required":false,"description":"Filter transferType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[transferType][like]","in":"query","required":false,"description":"Filter transferType (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[toEntityId]","in":"query","required":false,"description":"Filter toEntityId (equality)","schema":{"type":"string"}},{"name":"filter[toEntityId][ne]","in":"query","required":false,"description":"Filter toEntityId (ne)","schema":{"type":"string"}},{"name":"filter[toEntityId][gt]","in":"query","required":false,"description":"Filter toEntityId (gt)","schema":{"type":"string"}},{"name":"filter[toEntityId][gte]","in":"query","required":false,"description":"Filter toEntityId (gte)","schema":{"type":"string"}},{"name":"filter[toEntityId][lt]","in":"query","required":false,"description":"Filter toEntityId (lt)","schema":{"type":"string"}},{"name":"filter[toEntityId][lte]","in":"query","required":false,"description":"Filter toEntityId (lte)","schema":{"type":"string"}},{"name":"filter[toEntityId][in]","in":"query","required":false,"description":"Filter toEntityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[toEntityId][notIn]","in":"query","required":false,"description":"Filter toEntityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[toEntityId][between]","in":"query","required":false,"description":"Filter toEntityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[toEntityId][like]","in":"query","required":false,"description":"Filter toEntityId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[targetLocationId]","in":"query","required":false,"description":"Filter targetLocationId (equality)","schema":{"type":"string"}},{"name":"filter[targetLocationId][ne]","in":"query","required":false,"description":"Filter targetLocationId (ne)","schema":{"type":"string"}},{"name":"filter[targetLocationId][gt]","in":"query","required":false,"description":"Filter targetLocationId (gt)","schema":{"type":"string"}},{"name":"filter[targetLocationId][gte]","in":"query","required":false,"description":"Filter targetLocationId (gte)","schema":{"type":"string"}},{"name":"filter[targetLocationId][lt]","in":"query","required":false,"description":"Filter targetLocationId (lt)","schema":{"type":"string"}},{"name":"filter[targetLocationId][lte]","in":"query","required":false,"description":"Filter targetLocationId (lte)","schema":{"type":"string"}},{"name":"filter[targetLocationId][in]","in":"query","required":false,"description":"Filter targetLocationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[targetLocationId][notIn]","in":"query","required":false,"description":"Filter targetLocationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[targetLocationId][between]","in":"query","required":false,"description":"Filter targetLocationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[targetLocationId][like]","in":"query","required":false,"description":"Filter targetLocationId (like)","schema":{"type":"string"}},{"name":"filter[billingStatus]","in":"query","required":false,"description":"Filter billingStatus (equality)","schema":{"type":"string"}},{"name":"filter[billingStatus][ne]","in":"query","required":false,"description":"Filter billingStatus (ne)","schema":{"type":"string"}},{"name":"filter[billingStatus][gt]","in":"query","required":false,"description":"Filter billingStatus (gt)","schema":{"type":"string"}},{"name":"filter[billingStatus][gte]","in":"query","required":false,"description":"Filter billingStatus (gte)","schema":{"type":"string"}},{"name":"filter[billingStatus][lt]","in":"query","required":false,"description":"Filter billingStatus (lt)","schema":{"type":"string"}},{"name":"filter[billingStatus][lte]","in":"query","required":false,"description":"Filter billingStatus (lte)","schema":{"type":"string"}},{"name":"filter[billingStatus][in]","in":"query","required":false,"description":"Filter billingStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billingStatus][notIn]","in":"query","required":false,"description":"Filter billingStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billingStatus][between]","in":"query","required":false,"description":"Filter billingStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billingStatus][like]","in":"query","required":false,"description":"Filter billingStatus (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","documentStatus","-documentStatus","transferType","-transferType","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","referenceNumber","transferType","entityId","entityName","toEntityId","toEntityName","locationId","locationCode","locationName","targetLocationId","targetLocationCode","targetLocationName","billingStatus","intercompanyBillId","contractualCurrency","currency","sourceAmount","destinationCurrency","destinationAmount","notes","lineCount","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/warehouseTransfersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentNumber":"WTR-2291","documentStatus":"DRAFT","documentDate":"2026-08-18","transferType":"NORMAL","locationCode":"WH-CENTRAL","targetLocationCode":"WH-NORTH","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","documentNumber":"WTR-2292","documentStatus":"COMMITTED","documentDate":"2026-08-17","transferType":"INTERCOMPANY","billingStatus":"NOT_BILLED","toEntityName":"Acme GmbH","locationCode":"WH-CENTRAL","targetLocationCode":"WH-DE-01","lineCount":3,"lastModifiedDate":"2026-08-17T16:41:09.220Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List warehouse transfers","description":"Lists warehouse transfers. Each transfer comes back without its lines, with lineCount instead. Every other field matches GET inventory/warehouse-transfers/:id.\n\nTo find intercompany transfers that are committed but not billed, filter on transferType 'INTERCOMPANY', documentStatus 'COMMITTED' and billingStatus 'NOT_BILLED'.\n\nTo filter by item, use POST inventory/warehouse-transfers/search.","tags":["inventoryWarehouseTransfers"]}},"/inventory/landed-cost-items/{id}":{"get":{"operationId":"getLandedCostItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getLandedCostItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byAccount":{"value":{"data":{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14","accountId":"7e21b508-4a93-4c67-b0d5-19f6a3e84c72","accountNumber":"5820","accountName":"Customs and duty","allocationMode":"LineTotal","active":true,"lastModifiedDate":"2026-08-18T09:16:03.204Z"}},"summary":"A landed cost item that covers a general ledger account instead of an item."},"byItem":{"value":{"data":{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Weight","costingElementTypeId":"c4a90e21-7b35-4d18-9e02-6f13a85c7d40","costingElementTypeCode":"FRT","costingElementTypeName":"Freight","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"A landed cost item that covers a freight service item, allocated by 'Weight'."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost item you want to retrieve. Format: UUID.","examples":{"byAccount":{"value":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"},"byItem":{"value":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"}}}],"summary":"Retrieve a landed cost item","description":"Retrieves a landed cost item, with the names of its item, account, and costing element type.","tags":["inventoryLandedCostItems"]},"delete":{"operationId":"deleteLandedCostItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteLandedCostItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"remove":{"value":{"data":{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}},"summary":"Deleting a landed cost item for charges you no longer add to the value of stock (capitalize)."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost item you want to delete. Format: UUID.","examples":{"remove":{"value":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}}}],"summary":"Delete a landed cost item","description":"Deletes a landed cost item. After the delete, the vendor bill lines that this landed cost item matched no longer appear on GET inventory/landed-costs/vendor-bill-lines, unless another landed cost item also matches them. Landed costs keep any charges they already have from vendor bill lines that this landed cost item matched. To stop the matching but keep the landed cost item, set its `active` to false with PATCH inventory/landed-cost-items/:id instead.","tags":["inventoryLandedCostItems"]},"patch":{"operationId":"updateLandedCostItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateLandedCostItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"changeMode":{"value":{"data":{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"}},"summary":"Change the allocation mode from 'Weight' to 'Quantity', for example because items have no weights."},"retire":{"value":{"data":{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}},"summary":"Turn off a landed cost item without deleting it."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, UNKNOWN_ALLOCATION_MODE, DUPLICATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost item you want to update. Format: UUID.","examples":{"changeMode":{"value":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"},"retire":{"value":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateLandedCostItemInput"},"examples":{"changeMode":{"value":{"allocationMode":"Quantity"},"summary":"Change the allocation mode from 'Weight' to 'Quantity', for example because items have no weights."},"retire":{"value":{"active":false},"summary":"Turn off a landed cost item without deleting it."}}}}},"summary":"Update a landed cost item","description":"Updates a landed cost item with the fields you send. A field you leave out keeps its current value. You cannot remove a field's value, because null is not accepted.\n\nChanging `itemId` or `accountId` to one that another landed cost item already uses fails, because each `itemId` and each `accountId` can be used by only one landed cost item.\n\nThe response contains only the `id`. To see the updated landed cost item, use GET inventory/landed-cost-items/:id.","tags":["inventoryLandedCostItems"]}},"/inventory/inventory-decreases/{id}":{"patch":{"operationId":"updateInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"recountOneLine":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Forklift damage, aisle 4 — two more found","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:40:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"14.00","inventoryQuantity":"14.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"14.00","inventoryQuantity":"14.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"14.00","inventoryQuantity":"14.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"Two more damaged units turned up; the batch and bin detail is restated to match"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, UNKNOWN_TRACKING_NUMBER, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory decrease you want to update.","examples":{"recountOneLine":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateInventoryDecreaseInput"},"examples":{"recountOneLine":{"value":{"notes":"Forklift damage, aisle 4 — two more found","updateLines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","quantity":"14.00","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"14.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"14.00","batchNumber":"LOT-2026-08-14"}]}]},"summary":"Two more damaged units turned up; the batch and bin detail is restated to match"}}}}},"summary":"Update an inventory decrease","description":"Updates an inventory decrease with the fields you send. A field you leave out keeps its current value. Lines change through three separate arrays: deleteLines, updateLines, and createLines. You can send any combination in one request.\n\nLeave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value. On an updateLines item, sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin entry the line should keep.\n\nLeave all three out to keep the line's tracking as it is.\n\nOnly a draft can be changed. You can change its date, reason code, notes, and lines, but not its location. The response is the whole updated document.\n\nOne request can remove a line and add its replacement.","tags":["inventoryInventoryDecreases"]},"delete":{"operationId":"deleteInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"discardADraft":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}},"summary":"A draft that was raised in error"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory decrease you want to delete.","examples":{"discardADraft":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"summary":"Delete an inventory decrease","description":"Deletes an inventory decrease. The lines and their batch, serial, and bin details are deleted with the document. The batch numbers and serial numbers the lines used are kept.\n\nA draft or a canceled inventory decrease can be deleted. A committed one can't.","tags":["inventoryInventoryDecreases"]},"get":{"operationId":"getInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDraftCountCorrection":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"A drafted write-off of one batch-tracked item, out of one bin"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory decrease you want to retrieve.","examples":{"aDraftCountCorrection":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"summary":"Retrieve an inventory decrease","description":"Retrieves an inventory decrease. The inventory decrease comes back with its main fields, its lines, and each line's batch, serial, and bin details.\n\nPOST inventory/inventory-decreases/search returns the same fields. The collection GET inventory/inventory-decreases returns the main fields without the lines.\n\ndocumentStatus says what you can do next. A 'DRAFT' can be updated, committed, or deleted. A 'COMMITTED' one can't be changed or deleted, and a 'CANCELLED' one can only be deleted.","tags":["inventoryInventoryDecreases"]}},"/inventory/bins/search":{"post":{"operationId":"searchBins","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBinsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"coldChain":{"value":{"data":{"items":[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"isReceivingBin":false,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","supportsPerishable":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Every bin that may hold perishable stock"},"unprotected":{"value":{"data":{"items":[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"isReceivingBin":false,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","supportsPerishable":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Picking bins with no limit configured — nothing will stop them being overfilled"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBinsInput"},"examples":{"coldChain":{"value":{"filters":{"supportsPerishable":true}},"summary":"Every bin that may hold perishable stock"},"unprotected":{"value":{"filters":{"withoutLimits":true,"isPickingBin":true}},"summary":"Picking bins with no limit configured — nothing will stop them being overfilled"}}}}},"summary":"Search bins","description":"Searches bins. The fields are the same as on the collection. The filters include some the collection doesn't have, such as withoutLimits.\n\nOnly GET inventory/bins/:id returns capacity.","tags":["inventoryBins"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/account-determination-rules":{"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"]},"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"]}},"/inventory/landed-costs":{"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, 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":"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":"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":"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"]},"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"]}},"/inventory/receipts/bulk":{"post":{"operationId":"bulkCreateReceipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateReceiptsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadADaysReceipts":{"value":{"data":{"items":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]},{"id":"b81c4f30-27de-4a95-8106-3fd7e5a2c914","documentNumber":"SR-1043","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"PO-BAKKER-4418","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}]}},"summary":"Two receipts prepared together from a picking run"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, LINE_TOTAL_MISMATCH, INCOMPLETE_LINE, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, LOCATION_ENTITY_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","lineType","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","lineType","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","lineType","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateReceiptsInput"},"examples":{"loadADaysReceipts":{"value":{"receipts":[{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-14","deliveryDate":"2026-08-14","referenceNumber":"DN-77120","currency":"EUR","notes":"Received at the back dock","lines":[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]},{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-14","deliveryDate":"2026-08-14","referenceNumber":"PO-BAKKER-4418","currency":"EUR","notes":"Received at the back dock","lines":[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]}]},"summary":"Two receipts prepared together from a picking run"}}}}},"summary":"Bulk create receipts","description":"Creates multiple receipts in one request. Each receipt in receipts takes the same fields as the body of POST inventory/receipts, and every receipt is created in draft status. The response lists the created receipts in the order you sent them.\n\nIf any receipt can't be created, none are.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReceipts"]}},"/inventory/item-categories/{id}":{"delete":{"operationId":"deleteItemCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteItemCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"9d61b0af-3c58-4e17-b942-06ea8c73f215","name":"Pilot programme"}},"summary":"Removing a category no item has been assigned to"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ITEM_CATEGORY_IN_USE, ITEM_CATEGORY_HAS_CHILDREN","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item category you want to delete.","examples":{"basic":{"value":"9d61b0af-3c58-4e17-b942-06ea8c73f215"}}}],"summary":"Delete an item category","description":"Deletes an item category. A category that any item or inventory transaction uses, or that has categories beneath it, can't be deleted. The response is the deleted category's id and name.\n\nTo stop using a category that has history, set active to false with PATCH inventory/item-categories/:id instead. Existing items keep the category. An inactive category can still be assigned to an item.","tags":["inventoryItemCategories"]},"get":{"operationId":"getItemCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getItemCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","name":"Hardware","description":"Fasteners, fittings and tooling","active":true,"idealTurnoverRatio":"6.50","lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A category with a turnover target set"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item category you want to retrieve.","examples":{"basic":{"value":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}}}],"summary":"Retrieve an item category","description":"Retrieves an item category. The category comes back with its parent. POST inventory/item-categories/search returns the same fields, and GET inventory/item-categories returns all of them except parentId.\n\nNames aren't unique. To find categories by name, filter GET inventory/item-categories or POST inventory/item-categories/search by name, which can return several.","tags":["inventoryItemCategories"]},"patch":{"operationId":"updateItemCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateItemCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"raiseTheTurnoverTarget":{"value":{"data":{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}},"summary":"Change one field and leave the rest untouched"},"retireACategory":{"value":{"data":{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}},"summary":"Stop a category being assignable without deleting it or touching its items"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PARENT_NOT_FOUND, CATEGORY_CYCLE, CATEGORY_TOO_DEEP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"},"maxDepth":{"type":"number"}},"additionalProperties":false,"required":["id","parentId","maxDepth"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"},"maxDepth":{"type":"number"}},"additionalProperties":false,"required":["id","parentId","maxDepth"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"},"maxDepth":{"type":"number"}},"additionalProperties":false,"required":["id","parentId","maxDepth"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item category you want to update.","examples":{"raiseTheTurnoverTarget":{"value":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"},"retireACategory":{"value":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateItemCategoryInput"},"examples":{"raiseTheTurnoverTarget":{"value":{"idealTurnoverRatio":"8.00"},"summary":"Change one field and leave the rest untouched"},"retireACategory":{"value":{"active":false},"summary":"Stop a category being assignable without deleting it or touching its items"}}}}},"summary":"Update an item category","description":"Updates an item category with the fields you send. A field you leave out keeps its current value. To clear parentId and make this a top-level category, send null.\n\nYou can change the category's name, description, active flag, turnover target, and parent.\n\nThe response is only the id. To see the updated category, use GET inventory/item-categories/:id.","tags":["inventoryItemCategories"]}},"/inventory/reason-codes/bulk":{"post":{"operationId":"bulkCreateReasonCodes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateReasonCodesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"seedingAVocabulary":{"value":{"data":{"created":[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"},{"id":"1f5b83d0-6c47-4a92-b8e1-0d472a95c3f6"}]}},"summary":"Two reason codes created together; match the response to the request by index"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_CODE, DUPLICATE_CODE_IN_REQUEST, UNKNOWN_DOCUMENT_TYPES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["code","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["code","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["documentTypes","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["code","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["code","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["documentTypes","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["code","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["code","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["documentTypes","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateReasonCodesInput"},"examples":{"seedingAVocabulary":{"value":{"reasonCodes":[{"code":"DAMAGE","description":"Stock damaged in the warehouse","requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"]},{"code":"CYCLECOUNT","description":"Correction from a cycle count","documentTypes":["InventoryIncrease","InventoryDecrease"]}]},"summary":"Two reason codes created together; match the response to the request by index"}}}}},"summary":"Bulk create reason codes","description":"Creates multiple reason codes in one request. Send documentTypes with every reason code. It can be an empty list. If any reason code can't be created, none are. The response lists the new reason codes' ids in the order you sent them.\n\nEach reason code is checked against existing reason codes and against the others in the request before anything is written.\n\nTo create a single reason code, use POST inventory/reason-codes.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReasonCodes"]}},"/inventory/account-determination-rules/search":{"post":{"operationId":"searchAccountDeterminationRules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAccountDeterminationRulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"oneEntitysConfiguration":{"value":{"data":{"items":[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts","priority":10,"isActive":true,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"},"reasonCodeOverrides":[],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every active rule of one legal entity. GET inventory/account-determination-rules cannot filter by legal entity."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAccountDeterminationRulesInput"},"examples":{"oneEntitysConfiguration":{"value":{"filters":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","isActive":true}},"summary":"Every active rule of one legal entity. GET inventory/account-determination-rules cannot filter by legal entity."}}}}},"summary":"Search account determination rules","description":"Searches account determination rules, and returns each matching rule with its dimensions, accounts, and reason-code overrides.","tags":["inventoryAccountDeterminationRules"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/warehouse-transfers/bulk":{"post":{"operationId":"bulkCreateWarehouseTransfers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateWarehouseTransfersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aNightlyReplenishment":{"value":{"data":{"warehouseTransfers":[{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentStatus":"DRAFT","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]}},"summary":"One transfer per receiving warehouse, raised in a single call"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, INTERCOMPANY_CONFIG_MISSING, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateWarehouseTransfersInput"},"examples":{"aNightlyReplenishment":{"value":{"warehouseTransfers":[{"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"24"}]}]},"summary":"One transfer per receiving warehouse, raised in a single call"}}}}},"summary":"Bulk create warehouse transfers","description":"Creates multiple warehouse transfers in one request. Every transfer is created as a draft. If any transfer can't be created, none are.\n\nThe response lists the created transfers in the order you sent them, without their lines. To see a transfer's lines, use GET inventory/warehouse-transfers/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransfers"]}},"/inventory/shipment-carriers":{"post":{"operationId":"createShipmentCarrier","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createShipmentCarrierOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"linkedToAVendor":{"value":{"data":{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"}},"summary":"A carrier that bills through an existing vendor record"},"stagedInactive":{"value":{"data":{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714"}},"summary":"An in-house fleet with no vendor, created but not yet selectable"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: VENDOR_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createShipmentCarrierInput"},"examples":{"linkedToAVendor":{"value":{"name":"DHL Express","vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47"},"summary":"A carrier that bills through an existing vendor record"},"stagedInactive":{"value":{"name":"In-house fleet","active":false},"summary":"An in-house fleet with no vendor, created but not yet selectable"}}}}},"summary":"Create a shipment carrier","description":"Creates a shipment carrier. A carrier can be linked to the vendor it bills through.\n\nThe response contains only the new carrier's id. To read the record, use GET inventory/shipment-carriers/:id. To create several carriers at once, use POST inventory/shipment-carriers/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryShipmentCarriers"]},"get":{"operationId":"shipmentCarriers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorId]","in":"query","required":false,"description":"Filter vendorId (equality)","schema":{"type":"string"}},{"name":"filter[vendorId][ne]","in":"query","required":false,"description":"Filter vendorId (ne)","schema":{"type":"string"}},{"name":"filter[vendorId][gt]","in":"query","required":false,"description":"Filter vendorId (gt)","schema":{"type":"string"}},{"name":"filter[vendorId][gte]","in":"query","required":false,"description":"Filter vendorId (gte)","schema":{"type":"string"}},{"name":"filter[vendorId][lt]","in":"query","required":false,"description":"Filter vendorId (lt)","schema":{"type":"string"}},{"name":"filter[vendorId][lte]","in":"query","required":false,"description":"Filter vendorId (lte)","schema":{"type":"string"}},{"name":"filter[vendorId][in]","in":"query","required":false,"description":"Filter vendorId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorId][notIn]","in":"query","required":false,"description":"Filter vendorId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorId][between]","in":"query","required":false,"description":"Filter vendorId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorId][like]","in":"query","required":false,"description":"Filter vendorId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","active","-active","vendorId","-vendorId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","active","vendorId","vendorName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/shipmentCarriersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332","name":"DHL Express","active":true,"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47","vendorName":"DHL International GmbH","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714","name":"In-house fleet","active":true,"lastModifiedDate":"2026-05-12T09:31:00.000Z"},{"id":"0d94a2fe-51b7-4c88-a06d-3e7f21c94b55","name":"Regional Couriers","active":false,"vendorId":"9e5c1f70-3a82-4b46-8d09-71c4e0a92f38","vendorName":"Regional Couriers Ltd","lastModifiedDate":"2026-05-12T09:32:00.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List shipment carriers","description":"Lists shipment carriers. The fields are the same as on GET inventory/shipment-carriers/:id and POST inventory/shipment-carriers/search.\n\nTo find the carriers of one vendor, filter on vendorId. vendorName can't be filtered or sorted on.","tags":["inventoryShipmentCarriers"]}},"/inventory/serial-numbers":{"get":{"operationId":"serialNumbers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[serialNumber]","in":"query","required":false,"description":"Filter serialNumber (equality)","schema":{"type":"string"}},{"name":"filter[serialNumber][ne]","in":"query","required":false,"description":"Filter serialNumber (ne)","schema":{"type":"string"}},{"name":"filter[serialNumber][gt]","in":"query","required":false,"description":"Filter serialNumber (gt)","schema":{"type":"string"}},{"name":"filter[serialNumber][gte]","in":"query","required":false,"description":"Filter serialNumber (gte)","schema":{"type":"string"}},{"name":"filter[serialNumber][lt]","in":"query","required":false,"description":"Filter serialNumber (lt)","schema":{"type":"string"}},{"name":"filter[serialNumber][lte]","in":"query","required":false,"description":"Filter serialNumber (lte)","schema":{"type":"string"}},{"name":"filter[serialNumber][in]","in":"query","required":false,"description":"Filter serialNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumber][notIn]","in":"query","required":false,"description":"Filter serialNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumber][between]","in":"query","required":false,"description":"Filter serialNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serialNumber][like]","in":"query","required":false,"description":"Filter serialNumber (like)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (equality)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][ne]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (ne)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][gt]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (gt)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][gte]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (gte)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][lt]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (lt)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][lte]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (lte)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][in]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][notIn]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][between]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][like]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[isSold]","in":"query","required":false,"description":"Filter isSold (equality)","schema":{"type":"boolean"}},{"name":"filter[isSold][ne]","in":"query","required":false,"description":"Filter isSold (ne)","schema":{"type":"boolean"}},{"name":"filter[isSold][gt]","in":"query","required":false,"description":"Filter isSold (gt)","schema":{"type":"boolean"}},{"name":"filter[isSold][gte]","in":"query","required":false,"description":"Filter isSold (gte)","schema":{"type":"boolean"}},{"name":"filter[isSold][lt]","in":"query","required":false,"description":"Filter isSold (lt)","schema":{"type":"boolean"}},{"name":"filter[isSold][lte]","in":"query","required":false,"description":"Filter isSold (lte)","schema":{"type":"boolean"}},{"name":"filter[isSold][in]","in":"query","required":false,"description":"Filter isSold (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSold][notIn]","in":"query","required":false,"description":"Filter isSold (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSold][between]","in":"query","required":false,"description":"Filter isSold (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[expirationDate]","in":"query","required":false,"description":"Filter expirationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][ne]","in":"query","required":false,"description":"Filter expirationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gt]","in":"query","required":false,"description":"Filter expirationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gte]","in":"query","required":false,"description":"Filter expirationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lt]","in":"query","required":false,"description":"Filter expirationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lte]","in":"query","required":false,"description":"Filter expirationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][in]","in":"query","required":false,"description":"Filter expirationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][notIn]","in":"query","required":false,"description":"Filter expirationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][between]","in":"query","required":false,"description":"Filter expirationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","serialNumber","-serialNumber","expirationDate","-expirationDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","serialNumber","manufacturerSerialNumber","itemId","itemCode","itemName","locationId","locationCode","locationName","entityId","inStock","isSold","lastCostChangeDate","expirationDate","entryDate","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/serialNumbersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List serial numbers","description":"Lists serial numbers, without their costs. For `cost`, `originalCost`, `afterSaleCost`, and `currency`, use POST inventory/serial-numbers/search or GET inventory/serial-numbers/:id.","tags":["inventorySerialNumbers"]}},"/inventory/warehouses/bulk":{"post":{"operationId":"bulkCreateWarehouses","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateWarehousesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"standingUpASiteNetwork":{"value":{"data":{"created":[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"},{"id":"b5390f6a-1c72-4e84-9a03-8f2d61c74e59"}]}},"summary":"Two warehouses created together; match the response to the request by index"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_LOCATION_CODE, DUPLICATE_LOCATION_CODE_IN_REQUEST, ENTITY_NOT_FOUND, WAREHOUSE_TYPE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["locationCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["entityId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["warehouseTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["locationCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["entityId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["warehouseTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["locationCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["entityId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["warehouseTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateWarehousesInput"},"examples":{"standingUpASiteNetwork":{"value":{"warehouses":[{"locationCode":"WH-01","name":"Rotterdam Distribution Centre","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","countryCode":"NL"},{"locationCode":"WH-02","name":"Antwerp Overflow","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","countryCode":"BE"}]},"summary":"Two warehouses created together; match the response to the request by index"}}}}},"summary":"Bulk create warehouses","description":"Creates multiple warehouses in one request. If any warehouse can't be created, none are. 'index' on an error is that warehouse's position in the request, counting from zero.\n\nThe response has the id of each created warehouse, in the order you sent them. To create one warehouse, use POST inventory/warehouses.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouses"]}},"/inventory/inventory-increases/search":{"post":{"operationId":"searchInventoryIncreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInventoryIncreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"draftsAtOneWarehouse":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Everything still drafted at one warehouse, waiting to be committed"},"everyAdjustmentOfOneItem":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T10:03:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Every increase touching one item in August — the stock-investigation question"},"incrementalSync":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T10:03:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Everything changed since the last sync, for a caller keeping a copy"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInventoryIncreasesInput"},"examples":{"draftsAtOneWarehouse":{"value":{"filters":{"documentStatus":"DRAFT","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}},"summary":"Everything still drafted at one warehouse, waiting to be committed"},"everyAdjustmentOfOneItem":{"value":{"filters":{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Every increase touching one item in August — the stock-investigation question"},"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-14T00:00:00.000Z"}},"summary":"Everything changed since the last sync, for a caller keeping a copy"}}}}},"summary":"Search inventory increases","description":"Searches inventory increases. Each matching inventory increase comes back with its main fields, its lines, and each line's batch, serial, and bin details. The fields are the same as on GET inventory/inventory-increases/:id.\n\nThis is the only endpoint that filters by item. itemId matches inventory increases that have a line for that item.","tags":["inventoryInventoryIncreases"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/landed-costs/vendor-bill-lines":{"get":{"operationId":"getAvailableCharges","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAvailableChargesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"nothingConfigured":{"value":{"data":{"charges":[]}},"summary":"No vendor bill lines, because no landed cost item matches any bill line."},"whatIsAvailable":{"value":{"data":{"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillId":"e0b41f76-38c9-4d52-9a1e-7c5b02d6a834","vendorBillNumber":"VB-8842","description":"Sea freight, Shanghai to Felixstowe","poNumber":"PO-4471","billStatus":"approved","billDate":"2026-08-10","vendorName":"Meridian Logistics","entityId":"7039b992-696a-40c7-a181-51759304ef83","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Quantity","lineTotal":"300","allocatedAmount":"60","currency":"GBP","functionalLineTotal":"300","functionalAllocatedAmount":"60","functionalCurrency":"GBP"}]}},"summary":"The vendor bill lines one legal entity can add to a landed cost."}}}}},"400":{"description":"Invalid request or business failure. Codes: ENTITY_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"entityId","in":"query","required":true,"schema":{"type":"string"},"description":"The unique identifier of the legal entity whose vendor bill lines you want. Format: UUID. See `id` on GET base/entities (entities).","examples":{"nothingConfigured":{"value":"7039b992-696a-40c7-a181-51759304ef83"},"whatIsAvailable":{"value":"7039b992-696a-40c7-a181-51759304ef83"}}},{"name":"excludeFullyAllocated","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether to leave out vendor bill lines with nothing left to use, because committed landed costs have already used their whole amount. Defaults to true."}],"summary":"List available landed cost charges","description":"Lists the vendor bill lines of a legal entity that you can add to a landed cost as charges. A line is included when:\n\n- its vendor bill is approved\n- the line's item or general ledger account matches an active landed cost item\n- its currency can be converted to the legal entity's functional currency on the bill date\n\nTo set up landed cost items, use POST inventory/landed-cost-items. If the list is empty, check that landed cost items are set up. Without them, no line is included, even when there are approved vendor bills.","tags":["inventoryLandedCosts"]}},"/inventory/bins/bulk":{"post":{"operationId":"bulkCreateBins","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateBinsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"layOutARack":{"value":{"data":{"created":[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1"},{"id":"f0472b19-8c35-4e61-b7a2-6d05e83c1947","binCode":"A-01-2"}]}},"summary":"Two shelf levels of one rack"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DUPLICATE_CODE, WAREHOUSE_NOT_BIN_TRACKABLE, UNKNOWN_VALUE, INCOMPLETE_LIMIT, NON_POSITIVE_LIMIT, INVALID_RANGE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["dimension","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["tempMin","tempMax","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["dimension","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["tempMin","tempMax","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["dimension","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["tempMin","tempMax","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateBinsInput"},"examples":{"layOutARack":{"value":{"bins":[{"binCode":"A-01-1","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"1","isPickingBin":true},{"binCode":"A-01-2","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"2","isPickingBin":true}]},"summary":"Two shelf levels of one rack"}}}}},"summary":"Bulk create bins","description":"Creates multiple bins in one request. Every bin is checked the same way as on POST inventory/bins. If any bin can't be created, none are. The response lists the new bins' ids and codes in the order you sent them.\n\nThe duplicate check also compares the bins in the request with each other. Two bins with the same binCode or barcode are duplicates.\n\nTo create a single bin, use POST inventory/bins.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryBins"]}},"/inventory/batch-numbers":{"get":{"operationId":"batchNumbers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[batchNumber]","in":"query","required":false,"description":"Filter batchNumber (equality)","schema":{"type":"string"}},{"name":"filter[batchNumber][ne]","in":"query","required":false,"description":"Filter batchNumber (ne)","schema":{"type":"string"}},{"name":"filter[batchNumber][gt]","in":"query","required":false,"description":"Filter batchNumber (gt)","schema":{"type":"string"}},{"name":"filter[batchNumber][gte]","in":"query","required":false,"description":"Filter batchNumber (gte)","schema":{"type":"string"}},{"name":"filter[batchNumber][lt]","in":"query","required":false,"description":"Filter batchNumber (lt)","schema":{"type":"string"}},{"name":"filter[batchNumber][lte]","in":"query","required":false,"description":"Filter batchNumber (lte)","schema":{"type":"string"}},{"name":"filter[batchNumber][in]","in":"query","required":false,"description":"Filter batchNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumber][notIn]","in":"query","required":false,"description":"Filter batchNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumber][between]","in":"query","required":false,"description":"Filter batchNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchNumber][like]","in":"query","required":false,"description":"Filter batchNumber (like)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (equality)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][ne]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (ne)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][gt]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (gt)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][gte]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (gte)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][lt]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (lt)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][lte]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (lte)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][in]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerBatchNumber][notIn]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerBatchNumber][between]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[manufacturerBatchNumber][like]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[expirationDate]","in":"query","required":false,"description":"Filter expirationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][ne]","in":"query","required":false,"description":"Filter expirationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gt]","in":"query","required":false,"description":"Filter expirationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gte]","in":"query","required":false,"description":"Filter expirationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lt]","in":"query","required":false,"description":"Filter expirationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lte]","in":"query","required":false,"description":"Filter expirationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][in]","in":"query","required":false,"description":"Filter expirationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][notIn]","in":"query","required":false,"description":"Filter expirationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][between]","in":"query","required":false,"description":"Filter expirationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchStatus]","in":"query","required":false,"description":"Filter batchStatus (equality)","schema":{"type":"string"}},{"name":"filter[batchStatus][ne]","in":"query","required":false,"description":"Filter batchStatus (ne)","schema":{"type":"string"}},{"name":"filter[batchStatus][gt]","in":"query","required":false,"description":"Filter batchStatus (gt)","schema":{"type":"string"}},{"name":"filter[batchStatus][gte]","in":"query","required":false,"description":"Filter batchStatus (gte)","schema":{"type":"string"}},{"name":"filter[batchStatus][lt]","in":"query","required":false,"description":"Filter batchStatus (lt)","schema":{"type":"string"}},{"name":"filter[batchStatus][lte]","in":"query","required":false,"description":"Filter batchStatus (lte)","schema":{"type":"string"}},{"name":"filter[batchStatus][in]","in":"query","required":false,"description":"Filter batchStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchStatus][notIn]","in":"query","required":false,"description":"Filter batchStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchStatus][between]","in":"query","required":false,"description":"Filter batchStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchStatus][like]","in":"query","required":false,"description":"Filter batchStatus (like)","schema":{"type":"string"}},{"name":"filter[temperatureBreach]","in":"query","required":false,"description":"Filter temperatureBreach (equality)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][ne]","in":"query","required":false,"description":"Filter temperatureBreach (ne)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][gt]","in":"query","required":false,"description":"Filter temperatureBreach (gt)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][gte]","in":"query","required":false,"description":"Filter temperatureBreach (gte)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][lt]","in":"query","required":false,"description":"Filter temperatureBreach (lt)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][lte]","in":"query","required":false,"description":"Filter temperatureBreach (lte)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][in]","in":"query","required":false,"description":"Filter temperatureBreach (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[temperatureBreach][notIn]","in":"query","required":false,"description":"Filter temperatureBreach (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[temperatureBreach][between]","in":"query","required":false,"description":"Filter temperatureBreach (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[qcStatus]","in":"query","required":false,"description":"Filter qcStatus (equality)","schema":{"type":"string"}},{"name":"filter[qcStatus][ne]","in":"query","required":false,"description":"Filter qcStatus (ne)","schema":{"type":"string"}},{"name":"filter[qcStatus][gt]","in":"query","required":false,"description":"Filter qcStatus (gt)","schema":{"type":"string"}},{"name":"filter[qcStatus][gte]","in":"query","required":false,"description":"Filter qcStatus (gte)","schema":{"type":"string"}},{"name":"filter[qcStatus][lt]","in":"query","required":false,"description":"Filter qcStatus (lt)","schema":{"type":"string"}},{"name":"filter[qcStatus][lte]","in":"query","required":false,"description":"Filter qcStatus (lte)","schema":{"type":"string"}},{"name":"filter[qcStatus][in]","in":"query","required":false,"description":"Filter qcStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[qcStatus][notIn]","in":"query","required":false,"description":"Filter qcStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[qcStatus][between]","in":"query","required":false,"description":"Filter qcStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[qcStatus][like]","in":"query","required":false,"description":"Filter qcStatus (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","batchNumber","-batchNumber","expirationDate","-expirationDate","batchStatus","-batchStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","batchNumber","manufacturerBatchNumber","itemId","itemCode","itemName","locationId","locationCode","locationName","quantity","inStock","expirationDate","manufactureDate","bestBeforeDate","entryDate","batchStatus","temperatureBreach","qcStatus","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/batchNumbersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchNumber":"LOT-2026-0448","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","quantity":"400","inStock":"260","expirationDate":"2027-03-31","batchStatus":"ACTIVE","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List batch numbers","description":"Lists batch numbers, without their costs. For `cost`, `originalCost`, and `currency`, use POST inventory/batch-numbers/search or GET inventory/batch-numbers/:id.","tags":["inventoryBatchNumbers"]}},"/inventory/reason-codes/{id}":{"get":{"operationId":"getReasonCode","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReasonCodeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDecreaseReason":{"value":{"data":{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","code":"DAMAGE","description":"Stock damaged in the warehouse","isActive":true,"requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A reason code usable on write-downs and on returns, needing approval"},"withNoDocumentTypes":{"value":{"data":{"id":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c","code":"RECOUNT","isActive":false,"requiresApproval":false,"documentTypes":[],"lastModifiedDate":"2026-05-12T09:31:00.000Z"}},"summary":"A reason code linked to nothing yet returns an empty array, not an absent field"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the reason code you want to retrieve.","examples":{"aDecreaseReason":{"value":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"},"withNoDocumentTypes":{"value":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c"}}}],"summary":"Retrieve a reason code","description":"Retrieves a reason code. The reason code comes back with its settings and the document types it can be selected on.\n\nPOST inventory/reason-codes/search returns the same fields. The collection GET inventory/reason-codes returns them all except documentTypes.\n\nTo find a reason code by its code instead of its id, filter the collection on code.","tags":["inventoryReasonCodes"]},"delete":{"operationId":"deleteReasonCode","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteReasonCodeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c","code":"RECOUNT"}},"summary":"Removing a reason code no document has used"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REASON_CODE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the reason code you want to delete.","examples":{"basic":{"value":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c"}}}],"summary":"Delete a reason code","description":"Deletes a reason code. Deleting the reason code also deletes its links to document types. The response is the reason code's id and code.\n\nA reason code that an inventory increase, inventory decrease, inventory revaluation, purchase return, or sales return still uses can't be deleted. To retire the reason code instead, set isActive to false with PATCH inventory/reason-codes/:id.\n\nTo delete several at once, use POST inventory/reason-codes/bulk-delete.","tags":["inventoryReasonCodes"]},"patch":{"operationId":"updateReasonCode","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateReasonCodeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"replaceTheDocumentTypes":{"value":{"data":{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"}},"summary":"Declare the whole set — the third value is added, and anything not listed is removed"},"retireACode":{"value":{"data":{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"}},"summary":"Stop a reason code being selectable without deleting it or touching its documents"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_CODE, UNKNOWN_DOCUMENT_TYPES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the reason code you want to update.","examples":{"replaceTheDocumentTypes":{"value":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"},"retireACode":{"value":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateReasonCodeInput"},"examples":{"replaceTheDocumentTypes":{"value":{"documentTypes":["InventoryDecrease","SalesReturn","Disposal"]},"summary":"Declare the whole set — the third value is added, and anything not listed is removed"},"retireACode":{"value":{"isActive":false},"summary":"Stop a reason code being selectable without deleting it or touching its documents"}}}}},"summary":"Update a reason code","description":"Updates a reason code with the fields you send. A field you leave out keeps its current value. A documentTypes list you send replaces the whole list, so include every document type you want to keep.\n\nYou can change the reason code's code, description, isActive, requiresApproval, and documentTypes. The response is only its id.\n\nTo add a document type, read the current documentTypes with GET inventory/reason-codes/:id and send them back with the new one.\n\nTo see the updated reason code, use GET inventory/reason-codes/:id.","tags":["inventoryReasonCodes"]}},"/inventory/inventory-increases/bulk":{"post":{"operationId":"bulkCreateInventoryIncreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateInventoryIncreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadAMonthOfCorrections":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]},{"id":"0f5c8a24-91b7-4e63-8d02-4a7e1b96c380","documentNumber":"INC-43","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Second count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]}},"summary":"Two count corrections raised together"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateInventoryIncreasesInput"},"examples":{"loadAMonthOfCorrections":{"value":{"increases":[{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"August cycle count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]},{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Second count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]},"summary":"Two count corrections raised together"}}}}},"summary":"Bulk create inventory increases","description":"Creates multiple inventory increases in one request, each as a draft. Each inventory increase takes the same fields as POST inventory/inventory-increases. If any inventory increase can't be created, none are. The response lists each new draft in full, in the order you sent them.\n\nNo stock is added and no journal entry is created until you commit each draft with POST inventory/inventory-increases/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryIncreases"]}},"/inventory/warehouses":{"get":{"operationId":"warehouses","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType]","in":"query","required":false,"description":"Filter inventoryLocationType (equality)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][ne]","in":"query","required":false,"description":"Filter inventoryLocationType (ne)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][gt]","in":"query","required":false,"description":"Filter inventoryLocationType (gt)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][gte]","in":"query","required":false,"description":"Filter inventoryLocationType (gte)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][lt]","in":"query","required":false,"description":"Filter inventoryLocationType (lt)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][lte]","in":"query","required":false,"description":"Filter inventoryLocationType (lte)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][in]","in":"query","required":false,"description":"Filter inventoryLocationType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[inventoryLocationType][notIn]","in":"query","required":false,"description":"Filter inventoryLocationType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[inventoryLocationType][between]","in":"query","required":false,"description":"Filter inventoryLocationType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[inventoryLocationType][like]","in":"query","required":false,"description":"Filter inventoryLocationType (like)","schema":{"type":"string"}},{"name":"filter[isActive]","in":"query","required":false,"description":"Filter isActive (equality)","schema":{"type":"boolean"}},{"name":"filter[isActive][ne]","in":"query","required":false,"description":"Filter isActive (ne)","schema":{"type":"boolean"}},{"name":"filter[isActive][gt]","in":"query","required":false,"description":"Filter isActive (gt)","schema":{"type":"boolean"}},{"name":"filter[isActive][gte]","in":"query","required":false,"description":"Filter isActive (gte)","schema":{"type":"boolean"}},{"name":"filter[isActive][lt]","in":"query","required":false,"description":"Filter isActive (lt)","schema":{"type":"boolean"}},{"name":"filter[isActive][lte]","in":"query","required":false,"description":"Filter isActive (lte)","schema":{"type":"boolean"}},{"name":"filter[isActive][in]","in":"query","required":false,"description":"Filter isActive (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][notIn]","in":"query","required":false,"description":"Filter isActive (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][between]","in":"query","required":false,"description":"Filter isActive (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isPrimaryReceiving]","in":"query","required":false,"description":"Filter isPrimaryReceiving (equality)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][ne]","in":"query","required":false,"description":"Filter isPrimaryReceiving (ne)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][gt]","in":"query","required":false,"description":"Filter isPrimaryReceiving (gt)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][gte]","in":"query","required":false,"description":"Filter isPrimaryReceiving (gte)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][lt]","in":"query","required":false,"description":"Filter isPrimaryReceiving (lt)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][lte]","in":"query","required":false,"description":"Filter isPrimaryReceiving (lte)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][in]","in":"query","required":false,"description":"Filter isPrimaryReceiving (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPrimaryReceiving][notIn]","in":"query","required":false,"description":"Filter isPrimaryReceiving (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPrimaryReceiving][between]","in":"query","required":false,"description":"Filter isPrimaryReceiving (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId]","in":"query","required":false,"description":"Filter warehouseTypeId (equality)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][ne]","in":"query","required":false,"description":"Filter warehouseTypeId (ne)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][gt]","in":"query","required":false,"description":"Filter warehouseTypeId (gt)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][gte]","in":"query","required":false,"description":"Filter warehouseTypeId (gte)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][lt]","in":"query","required":false,"description":"Filter warehouseTypeId (lt)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][lte]","in":"query","required":false,"description":"Filter warehouseTypeId (lte)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][in]","in":"query","required":false,"description":"Filter warehouseTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[warehouseTypeId][notIn]","in":"query","required":false,"description":"Filter warehouseTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[warehouseTypeId][between]","in":"query","required":false,"description":"Filter warehouseTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[warehouseTypeId][like]","in":"query","required":false,"description":"Filter warehouseTypeId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","locationCode","-locationCode","entityId","-entityId","warehouseTypeId","-warehouseTypeId","inventoryLocationType","-inventoryLocationType","isActive","-isActive","isPrimaryReceiving","-isPrimaryReceiving","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","locationCode","name","inventoryLocationType","isActive","isPrimaryReceiving","addressLine1","addressLine2","city","stateProvince","postalCode","countryCode","region","entityId","entityName","warehouseTypeId","warehouseTypeName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/warehousesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","name":"Rotterdam Distribution Centre","inventoryLocationType":"WAREHOUSE","isActive":true,"isPrimaryReceiving":true,"addressLine1":"Waalhaven 12","city":"Rotterdam","postalCode":"3087 BM","countryCode":"NL","region":"Benelux","entityId":"81e8beb1-1415-4012-9012-8138580f43dc","entityName":"Acme GmbH","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"7b2f9d51-c084-4e37-a615-9d0e4728cb63","locationCode":"VIRT-QC","name":"Quality control hold","inventoryLocationType":"VIRTUAL_QC","isActive":true,"isPrimaryReceiving":false,"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 warehouses","description":"Lists warehouses. The fields are the same as on GET inventory/warehouses/:id and POST inventory/warehouses/search. The owning legal entity and the warehouse type each come back as both an id and a name.\n\nTo filter by name, city, country, or region, use POST inventory/warehouses/search.","tags":["inventoryWarehouses"]},"post":{"operationId":"createWarehouse","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createWarehouseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"WAREHOUSE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aStockingSite":{"value":{"data":{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}},"summary":"A real warehouse with a full address, flagged as the entity's receiving point"},"minimal":{"value":{"data":{"id":"b5390f6a-1c72-4e84-9a03-8f2d61c74e59"}},"summary":"The four required fields and nothing else"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_LOCATION_CODE, ENTITY_NOT_FOUND, WAREHOUSE_TYPE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createWarehouseInput"},"examples":{"aStockingSite":{"value":{"locationCode":"WH-01","name":"Rotterdam Distribution Centre","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","isPrimaryReceiving":true,"addressLine1":"Waalhaven 12","city":"Rotterdam","postalCode":"3087 BM","countryCode":"NL","region":"Benelux"},"summary":"A real warehouse with a full address, flagged as the entity's receiving point"},"minimal":{"value":{"locationCode":"WH-02","name":"Overflow store","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"STORE"},"summary":"The four required fields and nothing else"}}}}},"summary":"Create a warehouse","description":"Creates a warehouse. A warehouse belongs to a legal entity. The response is only the new warehouse's id. To read the new warehouse, use GET inventory/warehouses/:id.\n\nTo create several warehouses at once, use POST inventory/warehouses/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouses"]}},"/inventory/item-categories/search":{"post":{"operationId":"searchItemCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchItemCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"incrementalSync":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Everything changed since the last run, one page at a time"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchItemCategoriesInput"},"examples":{"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-01T00:00:00.000Z"},"page":{"cursor":"1042","size":200}},"summary":"Everything changed since the last run, one page at a time"}}}}},"summary":"Search item categories","description":"Searches item categories. The filters are name, active, and modifiedSince, sent in the request body. The fields are the same as on GET inventory/item-categories/:id.","tags":["inventoryItemCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/receipts/bulk-delete":{"post":{"operationId":"bulkDeleteReceipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteReceiptsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteReceiptsInput"}}}},"summary":"Bulk delete receipts","description":"Deletes multiple receipts in one request. Only draft receipts can be deleted. The response lists the deleted ids in the order you sent them.\n\nIf any id matches no receipt, or names a receipt that is not in draft status, none are deleted. To delete one receipt, use DELETE inventory/receipts/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReceipts"]}},"/inventory/account-determination-rules/{id}":{"get":{"operationId":"getAccountDeterminationRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountDeterminationRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aReceiptRule":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts","priority":10,"isActive":true,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"},"reasonCodeOverrides":[],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A rule for receipts of one item category in one accounting book. Every other dimension is a wildcard."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the rule you want to retrieve. Format: UUID.","examples":{"aReceiptRule":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}}}],"summary":"Retrieve an account determination rule","description":"Retrieves an account determination rule, with its dimensions, accounts, and reason-code overrides.","tags":["inventoryAccountDeterminationRules"]},"patch":{"operationId":"updateAccountDeterminationRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAccountDeterminationRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"assignOneAccount":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}},"summary":"Set one account. The other accounts, the dimensions, and the overrides keep their current values."},"swapAnOverride":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}},"summary":"Delete one reason-code override and add its replacement in the same request."},"widenADimension":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}},"summary":"Make a rule for one item category apply to every item category. Sending null clears the category. Leaving the field out keeps the current category."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, BOOK_REQUIRED, DUPLICATE_RULE_TUPLE, OVERRIDE_NOT_FOUND, UNKNOWN_PARENT_ACCOUNT_TYPE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OVERRIDE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"overrideId":{"type":"string"}},"additionalProperties":false,"required":["overrideId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OVERRIDE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"overrideId":{"type":"string"}},"additionalProperties":false,"required":["overrideId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OVERRIDE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"overrideId":{"type":"string"}},"additionalProperties":false,"required":["overrideId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the rule you want to update. Format: UUID.","examples":{"assignOneAccount":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"},"swapAnOverride":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"},"widenADimension":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAccountDeterminationRuleInput"},"examples":{"assignOneAccount":{"value":{"accounts":{"cogsAccountId":"9a4d18e2-70bc-4f51-8d36-2e0b74f9a3c1"}},"summary":"Set one account. The other accounts, the dimensions, and the overrides keep their current values."},"swapAnOverride":{"value":{"deleteReasonCodeOverrides":["b1c07e35-9d42-4a68-8f10-5c3e92a7b064"],"createReasonCodeOverrides":[{"reasonCodeId":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","accountId":"9a4d18e2-70bc-4f51-8d36-2e0b74f9a3c1","parentAccountType":"inventoryAdjustmentLossAccount"}]},"summary":"Delete one reason-code override and add its replacement in the same request."},"widenADimension":{"value":{"matching":{"itemCategoryId":null}},"summary":"Make a rule for one item category apply to every item category. Sending null clears the category. Leaving the field out keeps the current category."}}}}},"summary":"Update an account determination rule","description":"Updates an account determination rule with the fields you send. A field you leave out keeps its current value, including inside `matching` and `accounts`.\n\nTo clear a field in `matching` or `accounts`, send null. The book is the exception: you can change it, but not remove it.\n\nReason-code overrides change through three arrays: `createReasonCodeOverrides`, `updateReasonCodeOverrides`, and `deleteReasonCodeOverrides`.\n\nYou cannot change the rule's legal entity. To move a rule to another legal entity, create a new rule there and delete the old one.\n\nThe response is only the rule's `id`. To see the updated rule, use GET inventory/account-determination-rules/:id.","tags":["inventoryAccountDeterminationRules"]},"delete":{"operationId":"deleteAccountDeterminationRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAccountDeterminationRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts"}},"summary":"Deleting a rule and its reason-code overrides."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the rule you want to delete. Format: UUID.","examples":{"basic":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}}}],"summary":"Delete an account determination rule","description":"Deletes an account determination rule. The rule's reason-code overrides are deleted with it. The response is the deleted rule's `id` and `ruleName`.\n\nJournal entries that already used the rule do not change.\n\nTo turn off a rule without deleting it, set `isActive` to false with PATCH inventory/account-determination-rules/:id. To delete multiple rules, use POST inventory/account-determination-rules/bulk-delete.","tags":["inventoryAccountDeterminationRules"]}},"/inventory/receipts":{"post":{"operationId":"createReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"againstAPurchaseOrder":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}},"summary":"Two pallets and their inbound freight, received against a purchase order line"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, LINE_TOTAL_MISMATCH, INCOMPLETE_LINE, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, LOCATION_ENTITY_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createReceiptInput"},"examples":{"againstAPurchaseOrder":{"value":{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-14","deliveryDate":"2026-08-14","referenceNumber":"DN-77120","currency":"EUR","notes":"Received at the back dock","lines":[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]},"summary":"Two pallets and their inbound freight, received against a purchase order line"}}}}},"summary":"Create a receipt","description":"Creates a receipt in draft status. No stock is brought in and no journal entry is created for the accrual until you commit the receipt with POST inventory/receipts/:id/commit.\n\nEvery line's warehouse must belong to the receipt's legal entity. Otherwise the request fails with LOCATION_ENTITY_MISMATCH.\n\nThe response is the created receipt, with the same fields GET inventory/receipts/:id returns.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReceipts"]},"get":{"operationId":"receipts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryDate]","in":"query","required":false,"description":"Filter deliveryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][ne]","in":"query","required":false,"description":"Filter deliveryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gt]","in":"query","required":false,"description":"Filter deliveryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gte]","in":"query","required":false,"description":"Filter deliveryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lt]","in":"query","required":false,"description":"Filter deliveryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lte]","in":"query","required":false,"description":"Filter deliveryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][in]","in":"query","required":false,"description":"Filter deliveryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][notIn]","in":"query","required":false,"description":"Filter deliveryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][between]","in":"query","required":false,"description":"Filter deliveryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","deliveryDate","-deliveryDate","documentStatus","-documentStatus","totalAmount","-totalAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","deliveryDate","entityId","entityName","businessPartnerId","businessPartnerName","referenceNumber","trackingNumber","currency","totalAmount","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/receiptsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lineCount":2},{"id":"a4e81c07-52fb-4d93-8206-71b3fe0c9d54","documentNumber":"GR-2292","documentStatus":"COMMITTED","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","currency":"EUR","totalAmount":"2400.00","notes":"Weekly delivery","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-16T11:45:00.000Z","lineCount":5}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List receipts","description":"Lists receipts. The response has each receipt's main fields without its lines. lineCount is the number of lines on each receipt.\n\nThe vendor, the vendor's reference number, and the carrier's tracking number are returned but can't be filtered or sorted on here.\n\nTo read the lines, use GET inventory/receipts/:id or POST inventory/receipts/search. To filter by vendor, reference number, tracking number, item, or warehouse, use POST inventory/receipts/search.","tags":["inventoryReceipts"]}},"/inventory/warehouses/{id}":{"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":"Stop a site being selectable without deleting it or touching its stock and 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","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` 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":"Stop a site being selectable without deleting it or touching its stock and 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. 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"]},"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"]}},"/inventory/landed-cost-items/bulk":{"post":{"operationId":"bulkCreateLandedCostItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateLandedCostItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"setUp":{"value":{"data":{"created":[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"},{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}]}},"summary":"Two landed cost items created in one request: one covers a freight service item, the other a customs duty account."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_SELECTOR, REFERENCE_NOT_FOUND, UNKNOWN_ALLOCATION_MODE, DUPLICATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateLandedCostItemsInput"},"examples":{"setUp":{"value":{"landedCostItems":[{"itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","allocationMode":"Weight"},{"accountId":"7e21b508-4a93-4c67-b0d5-19f6a3e84c72","allocationMode":"LineTotal"}]},"summary":"Two landed cost items created in one request: one covers a freight service item, the other a customs duty account."}}}}},"summary":"Bulk create landed cost items","description":"Creates multiple landed cost items in one request. Each landed cost item follows the same rules as on POST inventory/landed-cost-items, and two landed cost items in the request cannot share an `itemId` or an `accountId`. If one landed cost item cannot be created, the request fails and no landed cost items are created.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCostItems"]}},"/inventory/inventory-transactions":{"get":{"operationId":"inventoryTransactions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType]","in":"query","required":false,"description":"Filter sourceDocumentLineType (equality)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][ne]","in":"query","required":false,"description":"Filter sourceDocumentLineType (ne)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][in]","in":"query","required":false,"description":"Filter sourceDocumentLineType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][notIn]","in":"query","required":false,"description":"Filter sourceDocumentLineType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][between]","in":"query","required":false,"description":"Filter sourceDocumentLineType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][like]","in":"query","required":false,"description":"Filter sourceDocumentLineType (like)","schema":{"type":"string"}},{"name":"filter[isReturn]","in":"query","required":false,"description":"Filter isReturn (equality)","schema":{"type":"boolean"}},{"name":"filter[isReturn][ne]","in":"query","required":false,"description":"Filter isReturn (ne)","schema":{"type":"boolean"}},{"name":"filter[isReturn][gt]","in":"query","required":false,"description":"Filter isReturn (gt)","schema":{"type":"boolean"}},{"name":"filter[isReturn][gte]","in":"query","required":false,"description":"Filter isReturn (gte)","schema":{"type":"boolean"}},{"name":"filter[isReturn][lt]","in":"query","required":false,"description":"Filter isReturn (lt)","schema":{"type":"boolean"}},{"name":"filter[isReturn][lte]","in":"query","required":false,"description":"Filter isReturn (lte)","schema":{"type":"boolean"}},{"name":"filter[isReturn][in]","in":"query","required":false,"description":"Filter isReturn (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReturn][notIn]","in":"query","required":false,"description":"Filter isReturn (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReturn][between]","in":"query","required":false,"description":"Filter isReturn (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isPriceDiff]","in":"query","required":false,"description":"Filter isPriceDiff (equality)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][ne]","in":"query","required":false,"description":"Filter isPriceDiff (ne)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][gt]","in":"query","required":false,"description":"Filter isPriceDiff (gt)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][gte]","in":"query","required":false,"description":"Filter isPriceDiff (gte)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][lt]","in":"query","required":false,"description":"Filter isPriceDiff (lt)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][lte]","in":"query","required":false,"description":"Filter isPriceDiff (lte)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][in]","in":"query","required":false,"description":"Filter isPriceDiff (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPriceDiff][notIn]","in":"query","required":false,"description":"Filter isPriceDiff (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPriceDiff][between]","in":"query","required":false,"description":"Filter isPriceDiff (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","transactionDate","-transactionDate","inQuantity","-inQuantity","outQuantity","-outQuantity","totalCost","-totalCost","itemCode","-itemCode","locationCode","-locationCode","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","itemId","itemCode","itemName","locationId","locationCode","locationName","unitId","unitCode","unitName","transactionDate","inQuantity","outQuantity","unitInQuantity","unitOutQuantity","unitCost","totalCost","salesAmount","currency","sourceDocumentLineType","isReturn","isPriceDiff","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/inventoryTransactionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-03","inQuantity":"500.00","outQuantity":"0.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"b91e7d02-5c48-4a36-90f7-1e4c8b","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-04","inQuantity":"0.00","outQuantity":"20.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"75.00","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-04T09:02:00.000Z","unitOutQuantity":"20.00"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List inventory transactions","description":"Lists inventory transactions. To order them, use the `sort` parameter, for example `sort=-transactionDate` for newest first.","tags":["inventoryInventoryTransactions"]}},"/inventory/shipment-carriers/search":{"post":{"operationId":"searchShipmentCarriers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchShipmentCarriersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byVendor":{"value":{"data":{"items":[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332","name":"DHL Express","active":true,"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47","vendorName":"DHL International GmbH","lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every carrier billing through one vendor"},"incrementalSync":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Everything changed since the last run, one page at a time"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchShipmentCarriersInput"},"examples":{"byVendor":{"value":{"filters":{"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47"}},"summary":"Every carrier billing through one vendor"},"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-01T00:00:00.000Z"},"page":{"cursor":"1042","size":200}},"summary":"Everything changed since the last run, one page at a time"}}}}},"summary":"Search shipment carriers","description":"Searches shipment carriers. The filters are name, whether the carrier is active, vendorId, and when the carrier last changed. There is no filter on vendorName.","tags":["inventoryShipmentCarriers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/item-types":{"get":{"operationId":"itemTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[procurable]","in":"query","required":false,"description":"Filter procurable (equality)","schema":{"type":"boolean"}},{"name":"filter[procurable][ne]","in":"query","required":false,"description":"Filter procurable (ne)","schema":{"type":"boolean"}},{"name":"filter[procurable][gt]","in":"query","required":false,"description":"Filter procurable (gt)","schema":{"type":"boolean"}},{"name":"filter[procurable][gte]","in":"query","required":false,"description":"Filter procurable (gte)","schema":{"type":"boolean"}},{"name":"filter[procurable][lt]","in":"query","required":false,"description":"Filter procurable (lt)","schema":{"type":"boolean"}},{"name":"filter[procurable][lte]","in":"query","required":false,"description":"Filter procurable (lte)","schema":{"type":"boolean"}},{"name":"filter[procurable][in]","in":"query","required":false,"description":"Filter procurable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[procurable][notIn]","in":"query","required":false,"description":"Filter procurable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[procurable][between]","in":"query","required":false,"description":"Filter procurable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[stockable]","in":"query","required":false,"description":"Filter stockable (equality)","schema":{"type":"boolean"}},{"name":"filter[stockable][ne]","in":"query","required":false,"description":"Filter stockable (ne)","schema":{"type":"boolean"}},{"name":"filter[stockable][gt]","in":"query","required":false,"description":"Filter stockable (gt)","schema":{"type":"boolean"}},{"name":"filter[stockable][gte]","in":"query","required":false,"description":"Filter stockable (gte)","schema":{"type":"boolean"}},{"name":"filter[stockable][lt]","in":"query","required":false,"description":"Filter stockable (lt)","schema":{"type":"boolean"}},{"name":"filter[stockable][lte]","in":"query","required":false,"description":"Filter stockable (lte)","schema":{"type":"boolean"}},{"name":"filter[stockable][in]","in":"query","required":false,"description":"Filter stockable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[stockable][notIn]","in":"query","required":false,"description":"Filter stockable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[stockable][between]","in":"query","required":false,"description":"Filter stockable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","active","-active","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","procurable","stockable","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/itemTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","name":"Stocked good","description":"Physical goods held in a warehouse","procurable":true,"stockable":true,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"b1d47e29-3c86-4a05-9f72-04e5c13b8a60","name":"Service","procurable":true,"stockable":false,"active":true,"lastModifiedDate":"2026-08-18T09:15:02.108Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List item types","description":"Lists item types. Item types are the values itemTypeId accepts when you create an item.\n\nThe collection leaves out itemCount, the number of items that use each item type. Read it from GET inventory/item-types/:id or POST inventory/item-types/search.","tags":["inventoryItemTypes"]}},"/inventory/inventory-levels/search":{"post":{"operationId":"searchInventoryLevels","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInventoryLevelsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"stockOfOneItemEverywhere":{"value":{"data":{"items":[{"id":"0b6d4c93-71ea-4f28-9c05-83a1e7f6204d","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","onHandQuantity":"1200.00","availableQuantity":"1150.00","allocatedQuantity":"50.00","averageCost":"3.75","onHandValue":"4500.00","currency":"EUR","lastTransactionTimestamp":"2026-08-03T11:15:00","lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every location holding one item — omit locationId to sweep the network"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInventoryLevelsInput"},"examples":{"stockOfOneItemEverywhere":{"value":{"filters":{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"}},"summary":"Every location holding one item — omit locationId to sweep the network"}}}}},"summary":"Search inventory levels","description":"Searches inventory levels. The fields are the same as on GET inventory/inventory-levels/:id and the collection GET inventory/inventory-levels.","tags":["inventoryInventoryLevels"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/inventory-revaluations/search":{"post":{"operationId":"searchInventoryRevaluations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInventoryRevaluationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"whatHasThisItemBeenRevaluedTo":{"value":{"data":{"items":[{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"COMMITTED","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Every posted revaluation touching one item, newest page first"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInventoryRevaluationsInput"},"examples":{"whatHasThisItemBeenRevaluedTo":{"value":{"filters":{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","documentStatus":"COMMITTED"},"page":{"size":25}},"summary":"Every posted revaluation touching one item, newest page first"}}}}},"summary":"Search inventory revaluations","description":"Searches inventory revaluations. Each revaluation comes back with its lines, in the same shape as GET inventory/inventory-revaluations/:id.\n\nOnly this endpoint filters by itemId or locationId. A revaluation matches when any of its lines has that item or warehouse.","tags":["inventoryInventoryRevaluations"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/unit-of-measure-groups/bulk-delete":{"post":{"operationId":"bulkDeleteUnitOfMeasureGroups","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteUnitOfMeasureGroupsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNIT_OF_MEASURE_GROUP_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteUnitOfMeasureGroupsInput"}}}},"summary":"Bulk delete unit of measure groups","description":"Deletes multiple unit of measure groups in one request. Each group must be empty first, with no items assigned to it and no conversion lines, the base unit's line included. Reassign the items, then remove the lines with deleteLines on PATCH inventory/unit-of-measure-groups/:id.\n\nIf any id is unknown, or names a group still in use, none are deleted.\n\nThe response lists the deleted groups in the order you sent them, each with its id and the name it had. To delete a single group, use DELETE inventory/unit-of-measure-groups/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasureGroups"]}},"/inventory/purchase-returns/from-purchase-order":{"post":{"operationId":"createPurchaseReturnFromPurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPurchaseReturnFromPurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NOTHING_RETURNABLE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_RETURNABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_RETURNABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_RETURNABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseReturnFromPurchaseOrderInput"}}}},"summary":"Draft a purchase order return","description":"Drafts a return for the returnable lines in a purchase order. The vendor, legal entity, and currency come from the purchase order. Each purchase order line for an item that still has something to return gets one purchase return line:\n\n- The quantity is the quantity received on the purchase order line minus the quantity already returned. Only shipped purchase returns count as returned.\n- For a batch-tracked or serialized item, the line gets the batches or serialized units received on the purchase order line that are not returned yet.\n\nThe batches and serialized units are chosen for you, so check them before you approve the purchase return.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that 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"]}},"/accounting/sales-orders":{"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"]},"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"]}},"/accounting/sales-orders/{id}":{"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"]},"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"]},"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"]}},"/inventory/inventory-decreases/bulk":{"post":{"operationId":"bulkCreateInventoryDecreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateInventoryDecreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadAMonthOfCorrections":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]},{"id":"0f5c8a24-91b7-4e63-8d02-4a7e1b96c380","documentNumber":"DEC-43","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Second count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]}},"summary":"Two write-offs raised together"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, UNKNOWN_TRACKING_NUMBER, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateInventoryDecreasesInput"},"examples":{"loadAMonthOfCorrections":{"value":{"decreases":[{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Forklift damage, aisle 4","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]},{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Second count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]},"summary":"Two write-offs raised together"}}}}},"summary":"Bulk create inventory decreases","description":"Creates multiple inventory decreases in one request, each as a draft. Each inventory decrease takes the same fields as POST inventory/inventory-decreases. If any inventory decrease can't be created, none are. The response lists each new draft in full, in the order you sent them.\n\nNo stock is removed and no journal entry is created until you commit each draft with POST inventory/inventory-decreases/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryDecreases"]}},"/inventory/purchase-returns/{id}/ship":{"post":{"operationId":"shipPurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/shipPurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase return you want to ship. Format: UUID.","example":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/shipPurchaseReturnInput"}}}},"summary":"Ship a purchase return","description":"Ships an approved purchase return. Shipping fails when the warehouse does not have enough stock. For a purchase return line that draws on a purchase order line, shipping chooses the receipt lines that the quantity comes from and records them in `applications`. To undo a shipped purchase return, cancel it with POST inventory/purchase-returns/:id/cancel.","tags":["inventoryPurchaseReturns"]}},"/inventory/item-categories/tree":{"get":{"operationId":"readItemCategoryTree","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/readItemCategoryTreeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"Retrieve the item category tree","description":"Retrieves the item category tree. Each category comes back with its parent, its depth in level, and in path the names from the top level down to the category itself. A category that has never been placed under a parent is at the top level, with level 0.\n\nCategories are ordered by name, not by position in the tree, so build the tree from parentId.","tags":["inventoryItemCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/unit-of-measure-groups/{id}":{"get":{"operationId":"getUnitOfMeasureGroup","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getUnitOfMeasureGroupOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aPackagingGroup":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846","name":"Packaging","description":"Eaches, boxes and pallets","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","baseUnitCode":"EA","lines":[{"id":"9f1b60d4-27ac-4e53-b8f1-05d3e79a2c68","unitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","conversionFactor":"1.00","isBaseUnit":true},{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"BOX","unitName":"Box","conversionFactor":"12.00","isBaseUnit":false}],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A group whose base unit is Each, with a box holding twelve"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure group you want to retrieve.","examples":{"aPackagingGroup":{"value":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}}}],"summary":"Retrieve a unit of measure group","description":"Retrieves a unit of measure group. The response has the whole group: its name, its base unit, and every conversion line.\n\nGET inventory/unit-of-measure-groups returns only the group's own fields, without the base unit or the lines. POST inventory/unit-of-measure-groups/search returns the whole group, like this endpoint.","tags":["inventoryUnitOfMeasureGroups"]},"delete":{"operationId":"deleteUnitOfMeasureGroup","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteUnitOfMeasureGroupOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4","name":"Weight"}},"summary":"Removing a group whose lines have already been cleared and that no item uses"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNIT_OF_MEASURE_GROUP_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure group you want to delete.","examples":{"basic":{"value":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"}}}],"summary":"Delete a unit of measure group","description":"Deletes a unit of measure group. The response gives the name the group had.\n\nThe group must be empty first, with no items assigned to it and no conversion lines, the base unit's line included. Reassign the items, then remove the lines with deleteLines on PATCH inventory/unit-of-measure-groups/:id.\n\nTo delete several groups at once, use POST inventory/unit-of-measure-groups/bulk-delete.","tags":["inventoryUnitOfMeasureGroups"]},"patch":{"operationId":"updateUnitOfMeasureGroup","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateUnitOfMeasureGroupOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"addAConversion":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}},"summary":"Add a pallet of 480 to an existing group, leaving its other lines alone"},"allThreeAtOnce":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}},"summary":"Rename the group, drop one line and add another — one transaction, deletes applied first"},"correctAFactor":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}},"summary":"Change one line's factor, addressing it by its own id"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNIT_NOT_FOUND, DUPLICATE_UNIT_IN_GROUP, LINE_NOT_FOUND, INVALID_CONVERSION_FACTOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure group you want to update.","examples":{"addAConversion":{"value":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"},"allThreeAtOnce":{"value":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"},"correctAFactor":{"value":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateUnitOfMeasureGroupInput"},"examples":{"addAConversion":{"value":{"createLines":[{"unitOfMeasureId":"d1f7b204-53ea-4c98-8b16-7f420e93ac57","conversionFactor":"480.00"}]},"summary":"Add a pallet of 480 to an existing group, leaving its other lines alone"},"allThreeAtOnce":{"value":{"name":"Packaging (revised)","deleteLines":["e04a83f5-91c6-4d27-a5b0-73f2e618d94c"],"createLines":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"24.00"}]},"summary":"Rename the group, drop one line and add another — one transaction, deletes applied first"},"correctAFactor":{"value":{"updateLines":[{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","conversionFactor":"24.00"}]},"summary":"Change one line's factor, addressing it by its own id"}}}}},"summary":"Update a unit of measure group","description":"Updates a unit of measure group with the fields you send. A field you leave out keeps its current value. Conversion lines change through three separate arrays, applied in this order: deleteLines, updateLines, createLines.\n\nLeave out all three to keep the lines as they are.\n\nChanges a unit of measure group's name, description, or conversion lines. The base unit can't be changed.\n\ndeleteLines and updateLines take line ids, and createLines takes new lines with no id. Because deletes come first, one request can remove a unit's line and add it back with a different factor.\n\nThe response contains only the group's id. To see the updated group, including the ids of new lines, use GET inventory/unit-of-measure-groups/:id.","tags":["inventoryUnitOfMeasureGroups"]}},"/inventory/inventory-decreases":{"post":{"operationId":"createInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aBatchTrackedCountCorrection":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"Twelve damaged units of one lot, taken from one bin"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, UNKNOWN_TRACKING_NUMBER, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createInventoryDecreaseInput"},"examples":{"aBatchTrackedCountCorrection":{"value":{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Forklift damage, aisle 4","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]},"summary":"Twelve damaged units of one lot, taken from one bin"}}}}},"summary":"Create an inventory decrease","description":"Creates an inventory decrease as a draft, with its lines. The response is the whole document, in the same shape as GET inventory/inventory-decreases/:id.\n\nNo stock moves and no journal entry is written until you commit the draft with POST inventory/inventory-decreases/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryDecreases"]},"get":{"operationId":"inventoryDecreases","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[reasonCodeId]","in":"query","required":false,"description":"Filter reasonCodeId (equality)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][ne]","in":"query","required":false,"description":"Filter reasonCodeId (ne)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][gt]","in":"query","required":false,"description":"Filter reasonCodeId (gt)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][gte]","in":"query","required":false,"description":"Filter reasonCodeId (gte)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][lt]","in":"query","required":false,"description":"Filter reasonCodeId (lt)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][lte]","in":"query","required":false,"description":"Filter reasonCodeId (lte)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][in]","in":"query","required":false,"description":"Filter reasonCodeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCodeId][notIn]","in":"query","required":false,"description":"Filter reasonCodeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCodeId][between]","in":"query","required":false,"description":"Filter reasonCodeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reasonCodeId][like]","in":"query","required":false,"description":"Filter reasonCodeId (like)","schema":{"type":"string"}},{"name":"filter[reasonCode]","in":"query","required":false,"description":"Filter reasonCode (equality)","schema":{"type":"string"}},{"name":"filter[reasonCode][ne]","in":"query","required":false,"description":"Filter reasonCode (ne)","schema":{"type":"string"}},{"name":"filter[reasonCode][gt]","in":"query","required":false,"description":"Filter reasonCode (gt)","schema":{"type":"string"}},{"name":"filter[reasonCode][gte]","in":"query","required":false,"description":"Filter reasonCode (gte)","schema":{"type":"string"}},{"name":"filter[reasonCode][lt]","in":"query","required":false,"description":"Filter reasonCode (lt)","schema":{"type":"string"}},{"name":"filter[reasonCode][lte]","in":"query","required":false,"description":"Filter reasonCode (lte)","schema":{"type":"string"}},{"name":"filter[reasonCode][in]","in":"query","required":false,"description":"Filter reasonCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCode][notIn]","in":"query","required":false,"description":"Filter reasonCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCode][between]","in":"query","required":false,"description":"Filter reasonCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reasonCode][like]","in":"query","required":false,"description":"Filter reasonCode (like)","schema":{"type":"string"}},{"name":"filter[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","currency","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/inventoryDecreasesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lineCount":1},{"id":"0f5c8a24-91b7-4e63-8d02-4a7e1b96c380","documentNumber":"DEC-43","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Quarterly shrinkage write-off","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-15T14:20:00.000Z","lineCount":4}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List inventory decreases","description":"Lists inventory decreases. Each inventory decrease comes back with its main fields and lineCount, but without the lines.\n\nTo read the lines, use GET inventory/inventory-decreases/:id or POST inventory/inventory-decreases/search. To filter by item, use POST inventory/inventory-decreases/search.","tags":["inventoryInventoryDecreases"]}},"/inventory/serial-transactions":{"get":{"operationId":"serialTransactions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[serialNumberId]","in":"query","required":false,"description":"Filter serialNumberId (equality)","schema":{"type":"string"}},{"name":"filter[serialNumberId][ne]","in":"query","required":false,"description":"Filter serialNumberId (ne)","schema":{"type":"string"}},{"name":"filter[serialNumberId][gt]","in":"query","required":false,"description":"Filter serialNumberId (gt)","schema":{"type":"string"}},{"name":"filter[serialNumberId][gte]","in":"query","required":false,"description":"Filter serialNumberId (gte)","schema":{"type":"string"}},{"name":"filter[serialNumberId][lt]","in":"query","required":false,"description":"Filter serialNumberId (lt)","schema":{"type":"string"}},{"name":"filter[serialNumberId][lte]","in":"query","required":false,"description":"Filter serialNumberId (lte)","schema":{"type":"string"}},{"name":"filter[serialNumberId][in]","in":"query","required":false,"description":"Filter serialNumberId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumberId][notIn]","in":"query","required":false,"description":"Filter serialNumberId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumberId][between]","in":"query","required":false,"description":"Filter serialNumberId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serialNumberId][like]","in":"query","required":false,"description":"Filter serialNumberId (like)","schema":{"type":"string"}},{"name":"filter[serialNumber]","in":"query","required":false,"description":"Filter serialNumber (equality)","schema":{"type":"string"}},{"name":"filter[serialNumber][ne]","in":"query","required":false,"description":"Filter serialNumber (ne)","schema":{"type":"string"}},{"name":"filter[serialNumber][gt]","in":"query","required":false,"description":"Filter serialNumber (gt)","schema":{"type":"string"}},{"name":"filter[serialNumber][gte]","in":"query","required":false,"description":"Filter serialNumber (gte)","schema":{"type":"string"}},{"name":"filter[serialNumber][lt]","in":"query","required":false,"description":"Filter serialNumber (lt)","schema":{"type":"string"}},{"name":"filter[serialNumber][lte]","in":"query","required":false,"description":"Filter serialNumber (lte)","schema":{"type":"string"}},{"name":"filter[serialNumber][in]","in":"query","required":false,"description":"Filter serialNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumber][notIn]","in":"query","required":false,"description":"Filter serialNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumber][between]","in":"query","required":false,"description":"Filter serialNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serialNumber][like]","in":"query","required":false,"description":"Filter serialNumber (like)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (equality)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][ne]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (ne)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][gt]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (gt)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][gte]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (gte)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][lt]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (lt)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][lte]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (lte)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][in]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][notIn]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][between]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][like]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (like)","schema":{"type":"string"}},{"name":"filter[expirationDate]","in":"query","required":false,"description":"Filter expirationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][ne]","in":"query","required":false,"description":"Filter expirationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gt]","in":"query","required":false,"description":"Filter expirationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gte]","in":"query","required":false,"description":"Filter expirationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lt]","in":"query","required":false,"description":"Filter expirationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lte]","in":"query","required":false,"description":"Filter expirationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][in]","in":"query","required":false,"description":"Filter expirationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][notIn]","in":"query","required":false,"description":"Filter expirationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][between]","in":"query","required":false,"description":"Filter expirationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entryDate]","in":"query","required":false,"description":"Filter entryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][ne]","in":"query","required":false,"description":"Filter entryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][gt]","in":"query","required":false,"description":"Filter entryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][gte]","in":"query","required":false,"description":"Filter entryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][lt]","in":"query","required":false,"description":"Filter entryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][lte]","in":"query","required":false,"description":"Filter entryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][in]","in":"query","required":false,"description":"Filter entryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entryDate][notIn]","in":"query","required":false,"description":"Filter entryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entryDate][between]","in":"query","required":false,"description":"Filter entryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isSold]","in":"query","required":false,"description":"Filter isSold (equality)","schema":{"type":"boolean"}},{"name":"filter[isSold][ne]","in":"query","required":false,"description":"Filter isSold (ne)","schema":{"type":"boolean"}},{"name":"filter[isSold][gt]","in":"query","required":false,"description":"Filter isSold (gt)","schema":{"type":"boolean"}},{"name":"filter[isSold][gte]","in":"query","required":false,"description":"Filter isSold (gte)","schema":{"type":"boolean"}},{"name":"filter[isSold][lt]","in":"query","required":false,"description":"Filter isSold (lt)","schema":{"type":"boolean"}},{"name":"filter[isSold][lte]","in":"query","required":false,"description":"Filter isSold (lte)","schema":{"type":"boolean"}},{"name":"filter[isSold][in]","in":"query","required":false,"description":"Filter isSold (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSold][notIn]","in":"query","required":false,"description":"Filter isSold (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSold][between]","in":"query","required":false,"description":"Filter isSold (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType]","in":"query","required":false,"description":"Filter sourceDocumentLineType (equality)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][ne]","in":"query","required":false,"description":"Filter sourceDocumentLineType (ne)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][in]","in":"query","required":false,"description":"Filter sourceDocumentLineType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][notIn]","in":"query","required":false,"description":"Filter sourceDocumentLineType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][between]","in":"query","required":false,"description":"Filter sourceDocumentLineType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][like]","in":"query","required":false,"description":"Filter sourceDocumentLineType (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","transactionDate","-transactionDate","entryDate","-entryDate","expirationDate","-expirationDate","serialNumber","-serialNumber","itemCode","-itemCode","locationCode","-locationCode","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","serialNumberId","serialNumber","manufacturerSerialNumber","expirationDate","entryDate","isSold","transactionId","itemId","itemCode","itemName","locationId","locationCode","locationName","transactionDate","inQuantity","outQuantity","cost","currency","sourceDocumentLineType","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/serialTransactionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":false,"transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"8d17b4e2-3c95-4a60-b7f8-01e5d9c26a43","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-11","outQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-11T09:02:00.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List serial transactions","description":"Lists serial transactions.","tags":["inventorySerialTransactions"]}},"/inventory/sales-returns/bulk":{"post":{"operationId":"bulkCreateSalesReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateSalesReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadAnRmaBatch":{"value":{"data":{"items":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]},{"id":"b81c4f30-27de-4a95-8106-3fd7e5a2c914","documentNumber":"SR-1043","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0088","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}]}},"summary":"Two returns raised together from a customer portal export"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateSalesReturnsInput"},"examples":{"loadAnRmaBatch":{"value":{"returns":[{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-18","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","notes":"Customer reports transit damage","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]},{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-18","referenceNumber":"RMA-2026-0088","trackingNumber":"3SABCD1234567","currency":"EUR","notes":"Customer reports transit damage","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]}]},"summary":"Two returns raised together from a customer portal export"}}}}},"summary":"Bulk create sales returns","description":"Creates multiple draft sales returns in one request. Each return in returns takes the same fields as POST inventory/sales-returns. If any return can't be created, none are. 'index' on the error is the position of that return, counting from zero.\n\nThe response lists the new drafts with their lines, in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventorySalesReturns"]}},"/inventory/batch-transactions":{"get":{"operationId":"batchTransactions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[batchNumberId]","in":"query","required":false,"description":"Filter batchNumberId (equality)","schema":{"type":"string"}},{"name":"filter[batchNumberId][ne]","in":"query","required":false,"description":"Filter batchNumberId (ne)","schema":{"type":"string"}},{"name":"filter[batchNumberId][gt]","in":"query","required":false,"description":"Filter batchNumberId (gt)","schema":{"type":"string"}},{"name":"filter[batchNumberId][gte]","in":"query","required":false,"description":"Filter batchNumberId (gte)","schema":{"type":"string"}},{"name":"filter[batchNumberId][lt]","in":"query","required":false,"description":"Filter batchNumberId (lt)","schema":{"type":"string"}},{"name":"filter[batchNumberId][lte]","in":"query","required":false,"description":"Filter batchNumberId (lte)","schema":{"type":"string"}},{"name":"filter[batchNumberId][in]","in":"query","required":false,"description":"Filter batchNumberId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumberId][notIn]","in":"query","required":false,"description":"Filter batchNumberId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumberId][between]","in":"query","required":false,"description":"Filter batchNumberId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchNumberId][like]","in":"query","required":false,"description":"Filter batchNumberId (like)","schema":{"type":"string"}},{"name":"filter[batchNumber]","in":"query","required":false,"description":"Filter batchNumber (equality)","schema":{"type":"string"}},{"name":"filter[batchNumber][ne]","in":"query","required":false,"description":"Filter batchNumber (ne)","schema":{"type":"string"}},{"name":"filter[batchNumber][gt]","in":"query","required":false,"description":"Filter batchNumber (gt)","schema":{"type":"string"}},{"name":"filter[batchNumber][gte]","in":"query","required":false,"description":"Filter batchNumber (gte)","schema":{"type":"string"}},{"name":"filter[batchNumber][lt]","in":"query","required":false,"description":"Filter batchNumber (lt)","schema":{"type":"string"}},{"name":"filter[batchNumber][lte]","in":"query","required":false,"description":"Filter batchNumber (lte)","schema":{"type":"string"}},{"name":"filter[batchNumber][in]","in":"query","required":false,"description":"Filter batchNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumber][notIn]","in":"query","required":false,"description":"Filter batchNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumber][between]","in":"query","required":false,"description":"Filter batchNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchNumber][like]","in":"query","required":false,"description":"Filter batchNumber (like)","schema":{"type":"string"}},{"name":"filter[expirationDate]","in":"query","required":false,"description":"Filter expirationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][ne]","in":"query","required":false,"description":"Filter expirationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gt]","in":"query","required":false,"description":"Filter expirationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gte]","in":"query","required":false,"description":"Filter expirationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lt]","in":"query","required":false,"description":"Filter expirationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lte]","in":"query","required":false,"description":"Filter expirationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][in]","in":"query","required":false,"description":"Filter expirationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][notIn]","in":"query","required":false,"description":"Filter expirationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][between]","in":"query","required":false,"description":"Filter expirationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType]","in":"query","required":false,"description":"Filter sourceDocumentLineType (equality)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][ne]","in":"query","required":false,"description":"Filter sourceDocumentLineType (ne)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][in]","in":"query","required":false,"description":"Filter sourceDocumentLineType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][notIn]","in":"query","required":false,"description":"Filter sourceDocumentLineType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][between]","in":"query","required":false,"description":"Filter sourceDocumentLineType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][like]","in":"query","required":false,"description":"Filter sourceDocumentLineType (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","transactionDate","-transactionDate","expirationDate","-expirationDate","batchNumber","-batchNumber","itemCode","-itemCode","locationCode","-locationCode","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","batchNumberId","batchNumber","expirationDate","transactionId","itemId","itemCode","itemName","locationId","locationCode","locationName","unitId","unitCode","transactionDate","inQuantity","outQuantity","unitInQuantity","unitOutQuantity","cost","valueDelta","currency","sourceDocumentLineType","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/batchTransactionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"500.00","cost":"3.75","valueDelta":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"af03c261-9d84-4e50-b127-6c9f1a3e80d5","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-05","outQuantity":"120.00","cost":"3.75","valueDelta":"-450.00","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-05T08:41:00.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List batch transactions","description":"Lists batch transactions.","tags":["inventoryBatchTransactions"]}},"/inventory/landed-cost-items":{"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"]},"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"]}},"/inventory/warehouse-transfer-orders/bulk-delete":{"post":{"operationId":"bulkDeleteTransferOrders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteTransferOrdersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteTransferOrdersInput"}}}},"summary":"Bulk delete warehouse transfer orders","description":"Deletes multiple draft warehouse transfer orders in one request. If any id matches no order, or names an order that is not 'DRAFT', none are deleted.\n\nThe response lists the deleted ids in the order you sent them. To delete one transfer order, use DELETE inventory/warehouse-transfer-orders/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransferOrders"]}},"/inventory/shipments/{id}":{"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"]},"delete":{"operationId":"deleteShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"discardADraft":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}},"summary":"A return raised against the wrong customer"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment you want to delete.","examples":{"discardADraft":{"value":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}}}],"summary":"Delete a shipment","description":"Deletes a shipment. Only a shipment in 'DRAFT' status can be deleted, before any stock has left or any journal entry has recorded the cost of sale. A 'PACKED' shipment can't be deleted either. No endpoint cancels a shipment once it has been shipped or delivered.","tags":["inventoryShipments"]},"patch":{"operationId":"updateShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"correctTheTrackingNumber":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD7654321","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"864.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T09:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"36.00","inventoryQuantity":"36.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}},"summary":"The carrier issued a new tracking number and four units were short-picked"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, SOURCE_LINE_NOT_PROJECTED, INVALID_QUANTITY, MIXED_LOCATIONS, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment you want to update.","examples":{"correctTheTrackingNumber":{"value":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateShipmentInput"},"examples":{"correctTheTrackingNumber":{"value":{"trackingNumber":"3SABCD7654321","updateLines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"36.00"}]},"summary":"The carrier issued a new tracking number and four units were short-picked"}}}}},"summary":"Update a shipment","description":"Updates a shipment with the fields you send. A field you leave out keeps its current value.\n\nUse the shipment's id, not its documentNumber.\n\nLines change through three separate arrays, applied in this order: updateLines, createLines, deleteLines. Leave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value.\n\nOn an updateLines item, sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin detail the line should keep. Leave all three out, or send them empty, to keep the line's tracking as it is.\n\nChanges a shipment in 'DRAFT' status, including its lines. A shipment in any other status, 'PACKED' included, can't be changed.\n\nOne request can remove a line and add its replacement. If a line id in deleteLines or updateLines is not on this shipment, the request fails with REFERENCE_NOT_FOUND.\n\nThe response is the updated shipment with its lines.","tags":["inventoryShipments"]}},"/inventory/sales-returns/search":{"post":{"operationId":"searchSalesReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSalesReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byRmaNumber":{"value":{"data":{"items":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}],"pagination":{"hasMore":false}}},"summary":"The return behind a customer's RMA number — the support desk's question"},"oneCustomersReturns":{"value":{"data":{"items":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"INSPECTED","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-19T15:10:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"0.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit","inspectedQuantity":"6.00","approvedQuantity":"2.00","rejectedQuantity":"4.00","inspectedDate":"2026-08-19","qualityGrade":"C","rejectionReason":"Water ingress","inspectionDetails":[{"approvalStatus":"APPROVED","inspectedQuantity":"2.00","condition":"GOOD","disposition":"RETURN_TO_STOCK"},{"approvalStatus":"REJECTED","inspectedQuantity":"4.00","condition":"DAMAGED","disposition":"SCRAP","rejectionReason":"Water ingress"}]}]}],"pagination":{"hasMore":false}}},"summary":"Everything one customer has sent back this month"},"theInspectionQueue":{"value":{"data":{"items":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}],"pagination":{"hasMore":false}}},"summary":"Every return whose goods are back and awaiting inspection"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSalesReturnsInput"},"examples":{"byRmaNumber":{"value":{"filters":{"referenceNumber":"RMA-2026-0087"}},"summary":"The return behind a customer's RMA number — the support desk's question"},"oneCustomersReturns":{"value":{"filters":{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Everything one customer has sent back this month"},"theInspectionQueue":{"value":{"filters":{"documentStatus":"RECEIVED"}},"summary":"Every return whose goods are back and awaiting inspection"}}}}},"summary":"Search sales returns","description":"Searches sales returns. Each return comes back with its lines, including their batches, serials, bins, and inspection details, in the same shape as GET inventory/sales-returns/:id.\n\nOnly this endpoint filters by customer, reference number, tracking number, item, or warehouse. A return matches itemId or locationId when any of its lines has that item or warehouse.","tags":["inventorySalesReturns"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/inventory-revaluations/{id}/commit":{"post":{"operationId":"commitInventoryRevaluation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitInventoryRevaluationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"postTheWriteDown":{"value":{"data":{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentStatus":"COMMITTED","journalEntryId":"3a91c74e-6b05-4d28-91f6-8c2e70a5d413","totalRevaluationAmount":"-450","warnings":[]}},"summary":"The stock revalues and the loss lands on the balance sheet"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, VALIDATION_FAILED, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revaluation you want to commit.","examples":{"postTheWriteDown":{"value":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitInventoryRevaluationInput"},"examples":{"postTheWriteDown":{"value":{},"summary":"The stock revalues and the loss lands on the balance sheet"}}}}},"summary":"Commit an inventory revaluation","description":"Commits a draft inventory revaluation and creates its journal entry. The commit writes the cost adjustments and revalues the inventory levels. The journal entry records the difference in value. documentStatus becomes 'COMMITTED'.\n\nOnly a draft can be committed. The whole revaluation is checked first. If any check fails, the error lists every problem and nothing is written.\n\nThe revaluation must have lines. Batch quantities and serials must match their lines, and a costing element type must be set.\n\ntotalRevaluationAmount in the response is the total change in stock value, negative for a write-down.","tags":["inventoryInventoryRevaluations"]}},"/inventory/inventory-revaluations/bulk-delete":{"post":{"operationId":"bulkDeleteInventoryRevaluations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteInventoryRevaluationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteInventoryRevaluationsInput"}}}},"summary":"Bulk delete inventory revaluations","description":"Deletes multiple draft inventory revaluations in one request. Every identifier is checked before anything is deleted. If any identifier matches no revaluation, or names a revaluation that is not a draft, none are deleted. 'index' on the error is the position of that identifier, counting from zero.\n\nThe response lists the identifiers of the deleted revaluations in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryRevaluations"]}},"/inventory/item-attribute-definitions":{"post":{"operationId":"createItemAttributeDefinition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createItemAttributeDefinitionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"colour":{"value":{"data":{"id":"c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48","name":"Colour","description":"Product colour","valueType":"TEXT","values":[{"id":"2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03","value":"Red"},{"id":"8e1a5c39-4b62-4d17-9f08-3a7c21d5e690","value":"Green"},{"id":"5d92f7b1-6c04-4e83-a215-9b83f4e07c2d","value":"Blue"}]}},"summary":"A text attribute with three allowed values"},"numeric":{"value":{"data":{"id":"a3f19d84-7c25-4e61-b0d9-2f8e4a6c1573","name":"Weight","valueType":"NUMBER","values":[{"id":"6b4e2a97-1d38-4c50-8e72-9a5f3b1c8d04","value":"25"},{"id":"f0c85d13-9e47-42b6-a381-7d2b6e904f5a","value":"50.5"}]}},"summary":"A numeric attribute — every value must parse as a number"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_NAME, UNKNOWN_VALUE_TYPE, NON_NUMERIC_VALUE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_NUMERIC_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_NUMERIC_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_NUMERIC_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createItemAttributeDefinitionInput"},"examples":{"colour":{"value":{"name":"Colour","description":"Product colour","valueType":"TEXT","values":["Red","Green","Blue"]},"summary":"A text attribute with three allowed values"},"numeric":{"value":{"name":"Weight","valueType":"NUMBER","values":["25","50.5"]},"summary":"A numeric attribute — every value must parse as a number"}}}}},"summary":"Create an item attribute","description":"Creates an item attribute and, in the same request, the values it allows. The attribute's name is unique within the tenant: a name already in use fails with DUPLICATE_NAME. valueType is TEXT or NUMBER and defaults to TEXT; under NUMBER every value must parse as a number, so 'Red' fails with NON_NUMERIC_VALUE rather than being stored as a value nothing can read. This is the only route on item attribute definitions: there is no read, update or delete, so an attribute created here is afterward maintained through the Item Attributes screen or a CSV upload.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItemAttributeDefinitions"]}},"/accounting/vendor-credits/{id}/apply":{"post":{"operationId":"applyVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/applyVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, NO_APPLICATIONS, APPLICATION_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that was refused."},"reason":{"type":"string","description":"The reason the application was refused."}},"additionalProperties":false,"required":["vendorCreditNumber","applicationIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that was refused."},"reason":{"type":"string","description":"The reason the application was refused."}},"additionalProperties":false,"required":["vendorCreditNumber","applicationIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that was refused."},"reason":{"type":"string","description":"The reason the application was refused."}},"additionalProperties":false,"required":["vendorCreditNumber","applicationIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor credit you want to apply.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyVendorCreditInput"}}}},"summary":"Apply a vendor credit to vendor bills","description":"Applies a vendor credit to vendor bills. Part or all of the credit can go to each bill, which lowers what the bill still owes. The response gives the number of applications recorded.\n\nTo undo an application, use POST accounting/vendor-credits/:id/unapply. A bill with credits applied to it can't be reversed until they are unapplied.","tags":["accountingVendorCredits"]}},"/accounting/purchase-orders/{id}":{"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"]},"get":{"operationId":"getPurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase order you want to retrieve.","example":"3d910e5e-0cd0-4b42-a477-1085bcc97fe7"}],"summary":"Retrieve a purchase order","description":"Retrieves a purchase order. Use the purchase order's id, not its poNumber.\n\nThe response has the order's lines and approval decisions.\n\nPOST accounting/purchase-orders/search returns the same fields for many orders, except approvals. GET accounting/purchase-orders returns orders without their lines.","tags":["accountingPurchaseOrders"]}},"/accounting/vendors":{"get":{"operationId":"vendors","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[vendorNumber]","in":"query","required":false,"description":"Filter vendorNumber (equality)","schema":{"type":"string"}},{"name":"filter[vendorNumber][ne]","in":"query","required":false,"description":"Filter vendorNumber (ne)","schema":{"type":"string"}},{"name":"filter[vendorNumber][gt]","in":"query","required":false,"description":"Filter vendorNumber (gt)","schema":{"type":"string"}},{"name":"filter[vendorNumber][gte]","in":"query","required":false,"description":"Filter vendorNumber (gte)","schema":{"type":"string"}},{"name":"filter[vendorNumber][lt]","in":"query","required":false,"description":"Filter vendorNumber (lt)","schema":{"type":"string"}},{"name":"filter[vendorNumber][lte]","in":"query","required":false,"description":"Filter vendorNumber (lte)","schema":{"type":"string"}},{"name":"filter[vendorNumber][in]","in":"query","required":false,"description":"Filter vendorNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorNumber][notIn]","in":"query","required":false,"description":"Filter vendorNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorNumber][between]","in":"query","required":false,"description":"Filter vendorNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorNumber][like]","in":"query","required":false,"description":"Filter vendorNumber (like)","schema":{"type":"string"}},{"name":"filter[vendorType]","in":"query","required":false,"description":"Filter vendorType (equality)","schema":{"type":"string"}},{"name":"filter[vendorType][ne]","in":"query","required":false,"description":"Filter vendorType (ne)","schema":{"type":"string"}},{"name":"filter[vendorType][gt]","in":"query","required":false,"description":"Filter vendorType (gt)","schema":{"type":"string"}},{"name":"filter[vendorType][gte]","in":"query","required":false,"description":"Filter vendorType (gte)","schema":{"type":"string"}},{"name":"filter[vendorType][lt]","in":"query","required":false,"description":"Filter vendorType (lt)","schema":{"type":"string"}},{"name":"filter[vendorType][lte]","in":"query","required":false,"description":"Filter vendorType (lte)","schema":{"type":"string"}},{"name":"filter[vendorType][in]","in":"query","required":false,"description":"Filter vendorType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorType][notIn]","in":"query","required":false,"description":"Filter vendorType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorType][between]","in":"query","required":false,"description":"Filter vendorType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorType][like]","in":"query","required":false,"description":"Filter vendorType (like)","schema":{"type":"string"}},{"name":"filter[vendorSubType]","in":"query","required":false,"description":"Filter vendorSubType (equality)","schema":{"type":"string"}},{"name":"filter[vendorSubType][ne]","in":"query","required":false,"description":"Filter vendorSubType (ne)","schema":{"type":"string"}},{"name":"filter[vendorSubType][gt]","in":"query","required":false,"description":"Filter vendorSubType (gt)","schema":{"type":"string"}},{"name":"filter[vendorSubType][gte]","in":"query","required":false,"description":"Filter vendorSubType (gte)","schema":{"type":"string"}},{"name":"filter[vendorSubType][lt]","in":"query","required":false,"description":"Filter vendorSubType (lt)","schema":{"type":"string"}},{"name":"filter[vendorSubType][lte]","in":"query","required":false,"description":"Filter vendorSubType (lte)","schema":{"type":"string"}},{"name":"filter[vendorSubType][in]","in":"query","required":false,"description":"Filter vendorSubType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorSubType][notIn]","in":"query","required":false,"description":"Filter vendorSubType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorSubType][between]","in":"query","required":false,"description":"Filter vendorSubType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorSubType][like]","in":"query","required":false,"description":"Filter vendorSubType (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[paymentTerms]","in":"query","required":false,"description":"Filter paymentTerms (equality)","schema":{"type":"string"}},{"name":"filter[paymentTerms][ne]","in":"query","required":false,"description":"Filter paymentTerms (ne)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gt]","in":"query","required":false,"description":"Filter paymentTerms (gt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gte]","in":"query","required":false,"description":"Filter paymentTerms (gte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lt]","in":"query","required":false,"description":"Filter paymentTerms (lt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lte]","in":"query","required":false,"description":"Filter paymentTerms (lte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][in]","in":"query","required":false,"description":"Filter paymentTerms (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][notIn]","in":"query","required":false,"description":"Filter paymentTerms (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][between]","in":"query","required":false,"description":"Filter paymentTerms (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms][like]","in":"query","required":false,"description":"Filter paymentTerms (like)","schema":{"type":"string"}},{"name":"filter[preferredCurrency]","in":"query","required":false,"description":"Filter preferredCurrency (equality)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][ne]","in":"query","required":false,"description":"Filter preferredCurrency (ne)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][gt]","in":"query","required":false,"description":"Filter preferredCurrency (gt)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][gte]","in":"query","required":false,"description":"Filter preferredCurrency (gte)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][lt]","in":"query","required":false,"description":"Filter preferredCurrency (lt)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][lte]","in":"query","required":false,"description":"Filter preferredCurrency (lte)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][in]","in":"query","required":false,"description":"Filter preferredCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[preferredCurrency][notIn]","in":"query","required":false,"description":"Filter preferredCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[preferredCurrency][between]","in":"query","required":false,"description":"Filter preferredCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[preferredCurrency][like]","in":"query","required":false,"description":"Filter preferredCurrency (like)","schema":{"type":"string"}},{"name":"filter[independentContractor]","in":"query","required":false,"description":"Filter independentContractor (equality)","schema":{"type":"string"}},{"name":"filter[independentContractor][ne]","in":"query","required":false,"description":"Filter independentContractor (ne)","schema":{"type":"string"}},{"name":"filter[independentContractor][gt]","in":"query","required":false,"description":"Filter independentContractor (gt)","schema":{"type":"string"}},{"name":"filter[independentContractor][gte]","in":"query","required":false,"description":"Filter independentContractor (gte)","schema":{"type":"string"}},{"name":"filter[independentContractor][lt]","in":"query","required":false,"description":"Filter independentContractor (lt)","schema":{"type":"string"}},{"name":"filter[independentContractor][lte]","in":"query","required":false,"description":"Filter independentContractor (lte)","schema":{"type":"string"}},{"name":"filter[independentContractor][in]","in":"query","required":false,"description":"Filter independentContractor (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[independentContractor][notIn]","in":"query","required":false,"description":"Filter independentContractor (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[independentContractor][between]","in":"query","required":false,"description":"Filter independentContractor (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[independentContractor][like]","in":"query","required":false,"description":"Filter independentContractor (like)","schema":{"type":"string"}},{"name":"filter[externalVendorId]","in":"query","required":false,"description":"Filter externalVendorId (equality)","schema":{"type":"string"}},{"name":"filter[externalVendorId][ne]","in":"query","required":false,"description":"Filter externalVendorId (ne)","schema":{"type":"string"}},{"name":"filter[externalVendorId][gt]","in":"query","required":false,"description":"Filter externalVendorId (gt)","schema":{"type":"string"}},{"name":"filter[externalVendorId][gte]","in":"query","required":false,"description":"Filter externalVendorId (gte)","schema":{"type":"string"}},{"name":"filter[externalVendorId][lt]","in":"query","required":false,"description":"Filter externalVendorId (lt)","schema":{"type":"string"}},{"name":"filter[externalVendorId][lte]","in":"query","required":false,"description":"Filter externalVendorId (lte)","schema":{"type":"string"}},{"name":"filter[externalVendorId][in]","in":"query","required":false,"description":"Filter externalVendorId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalVendorId][notIn]","in":"query","required":false,"description":"Filter externalVendorId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalVendorId][between]","in":"query","required":false,"description":"Filter externalVendorId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalVendorId][like]","in":"query","required":false,"description":"Filter externalVendorId (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","vendorNumber","-vendorNumber","vendorType","-vendorType","vendorSubType","-vendorSubType","status","-status","paymentTerms","-paymentTerms","preferredCurrency","-preferredCurrency","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","vendorName","vendorNumber","vendorType","vendorSubType","status","paymentTerms","preferredCurrency","independentContractor","externalVendorId","origin","mainContactEmail","mainContactName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/vendorsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List vendors","description":"Lists vendors. To filter by name, contact email, or legal entity, use POST accounting/vendors/search.","tags":["accountingVendors"]},"post":{"operationId":"createVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: 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":"REFERENCE_NOT_FOUND"},"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":"REFERENCE_NOT_FOUND"},"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":"REFERENCE_NOT_FOUND"},"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}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVendorInput"}}}},"summary":"Create a vendor","description":"Creates a vendor. A business partner with the same name is created with the vendor. Journal entries record the business partner, and you don't create the business partner yourself.\n\nThe response contains only the new vendor's id. vendorNumber is assigned from a gapless number range. To see the vendor, use GET accounting/vendors/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingVendors"]}},"/accounting/purchase-requests/{id}":{"get":{"operationId":"getPurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase request you want to retrieve.","example":"c464128b-71f9-4de8-973c-14e2c8b3eaac"}],"summary":"Retrieve a purchase request","description":"Retrieves a purchase request. Use the purchase request's id, not its purchaseRequestNumber.\n\nA purchase request is an internal request to buy. The response has the request's lines and approval decisions.\n\nPOST accounting/purchase-requests/search returns the same fields for many requests, except approvals. GET accounting/purchase-requests returns requests without their lines.","tags":["accountingPurchaseRequests"]},"patch":{"operationId":"updatePurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, LINE_NOT_FOUND, LINE_LINKED_TO_PURCHASE_ORDER, NO_LINES, TOO_MANY_LINES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this request."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_LINKED_TO_PURCHASE_ORDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"},"description":"The ids of the lines that are already on a purchase order."}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request that would have been left empty."}},"additionalProperties":false,"required":["purchaseRequestNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request would have carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this request."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_LINKED_TO_PURCHASE_ORDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"},"description":"The ids of the lines that are already on a purchase order."}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request that would have been left empty."}},"additionalProperties":false,"required":["purchaseRequestNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request would have carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this request."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_LINKED_TO_PURCHASE_ORDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"},"description":"The ids of the lines that are already on a purchase order."}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request that would have been left empty."}},"additionalProperties":false,"required":["purchaseRequestNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request would have carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase request you want to update.","example":"5f8a2c31-6b07-4d92-a4e8-1c93b0f7d254"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePurchaseRequestInput"}}}},"summary":"Update a purchase request","description":"Updates a purchase request with the fields you send. A field you leave out keeps its current value.\n\nUse the purchase request's id, not its purchaseRequestNumber.\n\nLines change through three separate arrays, applied in this order: deleteLines, updateLines, createLines. Lines you don't name stay as they are. On an updateLines item, a field you leave out keeps its current value.\n\nAfter the update, the purchase request goes through your tenant's approval policy again. An approved or rejected request goes back to 'pendingApproval' first.\n\nentityId and currency can't be changed, and status isn't an input. To approve or reject a request, use POST accounting/purchase-requests/:id/approve or POST accounting/purchase-requests/:id/reject.\n\nupdateLines and deleteLines name each line by the id that GET accounting/purchase-requests/:id returns for it.\n\ndeleteLines is always refused, even for lines that are not on any purchase order.\n\nThe response is empty. To see the updated request, use GET accounting/purchase-requests/:id.","tags":["accountingPurchaseRequests"]}},"/accounting/outbound-payments":{"get":{"operationId":"outboundPayments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber]","in":"query","required":false,"description":"Filter outboundPaymentNumber (equality)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][ne]","in":"query","required":false,"description":"Filter outboundPaymentNumber (ne)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][gt]","in":"query","required":false,"description":"Filter outboundPaymentNumber (gt)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][gte]","in":"query","required":false,"description":"Filter outboundPaymentNumber (gte)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][lt]","in":"query","required":false,"description":"Filter outboundPaymentNumber (lt)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][lte]","in":"query","required":false,"description":"Filter outboundPaymentNumber (lte)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][in]","in":"query","required":false,"description":"Filter outboundPaymentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[outboundPaymentNumber][notIn]","in":"query","required":false,"description":"Filter outboundPaymentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[outboundPaymentNumber][between]","in":"query","required":false,"description":"Filter outboundPaymentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[outboundPaymentNumber][like]","in":"query","required":false,"description":"Filter outboundPaymentNumber (like)","schema":{"type":"string"}},{"name":"filter[paymentDate]","in":"query","required":false,"description":"Filter paymentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][ne]","in":"query","required":false,"description":"Filter paymentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gt]","in":"query","required":false,"description":"Filter paymentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gte]","in":"query","required":false,"description":"Filter paymentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lt]","in":"query","required":false,"description":"Filter paymentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lte]","in":"query","required":false,"description":"Filter paymentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][in]","in":"query","required":false,"description":"Filter paymentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][notIn]","in":"query","required":false,"description":"Filter paymentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][between]","in":"query","required":false,"description":"Filter paymentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentCurrency]","in":"query","required":false,"description":"Filter paymentCurrency (equality)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][ne]","in":"query","required":false,"description":"Filter paymentCurrency (ne)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][gt]","in":"query","required":false,"description":"Filter paymentCurrency (gt)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][gte]","in":"query","required":false,"description":"Filter paymentCurrency (gte)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][lt]","in":"query","required":false,"description":"Filter paymentCurrency (lt)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][lte]","in":"query","required":false,"description":"Filter paymentCurrency (lte)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][in]","in":"query","required":false,"description":"Filter paymentCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentCurrency][notIn]","in":"query","required":false,"description":"Filter paymentCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentCurrency][between]","in":"query","required":false,"description":"Filter paymentCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentCurrency][like]","in":"query","required":false,"description":"Filter paymentCurrency (like)","schema":{"type":"string"}},{"name":"filter[paymentType]","in":"query","required":false,"description":"Filter paymentType (equality)","schema":{"type":"string"}},{"name":"filter[paymentType][ne]","in":"query","required":false,"description":"Filter paymentType (ne)","schema":{"type":"string"}},{"name":"filter[paymentType][gt]","in":"query","required":false,"description":"Filter paymentType (gt)","schema":{"type":"string"}},{"name":"filter[paymentType][gte]","in":"query","required":false,"description":"Filter paymentType (gte)","schema":{"type":"string"}},{"name":"filter[paymentType][lt]","in":"query","required":false,"description":"Filter paymentType (lt)","schema":{"type":"string"}},{"name":"filter[paymentType][lte]","in":"query","required":false,"description":"Filter paymentType (lte)","schema":{"type":"string"}},{"name":"filter[paymentType][in]","in":"query","required":false,"description":"Filter paymentType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][notIn]","in":"query","required":false,"description":"Filter paymentType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][between]","in":"query","required":false,"description":"Filter paymentType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentType][like]","in":"query","required":false,"description":"Filter paymentType (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[applicationStatus]","in":"query","required":false,"description":"Filter applicationStatus (equality)","schema":{"type":"string"}},{"name":"filter[applicationStatus][ne]","in":"query","required":false,"description":"Filter applicationStatus (ne)","schema":{"type":"string"}},{"name":"filter[applicationStatus][gt]","in":"query","required":false,"description":"Filter applicationStatus (gt)","schema":{"type":"string"}},{"name":"filter[applicationStatus][gte]","in":"query","required":false,"description":"Filter applicationStatus (gte)","schema":{"type":"string"}},{"name":"filter[applicationStatus][lt]","in":"query","required":false,"description":"Filter applicationStatus (lt)","schema":{"type":"string"}},{"name":"filter[applicationStatus][lte]","in":"query","required":false,"description":"Filter applicationStatus (lte)","schema":{"type":"string"}},{"name":"filter[applicationStatus][in]","in":"query","required":false,"description":"Filter applicationStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[applicationStatus][notIn]","in":"query","required":false,"description":"Filter applicationStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[applicationStatus][between]","in":"query","required":false,"description":"Filter applicationStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[applicationStatus][like]","in":"query","required":false,"description":"Filter applicationStatus (like)","schema":{"type":"string"}},{"name":"filter[externalId]","in":"query","required":false,"description":"Filter externalId (equality)","schema":{"type":"string"}},{"name":"filter[externalId][ne]","in":"query","required":false,"description":"Filter externalId (ne)","schema":{"type":"string"}},{"name":"filter[externalId][gt]","in":"query","required":false,"description":"Filter externalId (gt)","schema":{"type":"string"}},{"name":"filter[externalId][gte]","in":"query","required":false,"description":"Filter externalId (gte)","schema":{"type":"string"}},{"name":"filter[externalId][lt]","in":"query","required":false,"description":"Filter externalId (lt)","schema":{"type":"string"}},{"name":"filter[externalId][lte]","in":"query","required":false,"description":"Filter externalId (lte)","schema":{"type":"string"}},{"name":"filter[externalId][in]","in":"query","required":false,"description":"Filter externalId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][notIn]","in":"query","required":false,"description":"Filter externalId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][between]","in":"query","required":false,"description":"Filter externalId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalId][like]","in":"query","required":false,"description":"Filter externalId (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[singlePayment]","in":"query","required":false,"description":"Filter singlePayment (equality)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][ne]","in":"query","required":false,"description":"Filter singlePayment (ne)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][gt]","in":"query","required":false,"description":"Filter singlePayment (gt)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][gte]","in":"query","required":false,"description":"Filter singlePayment (gte)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][lt]","in":"query","required":false,"description":"Filter singlePayment (lt)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][lte]","in":"query","required":false,"description":"Filter singlePayment (lte)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][in]","in":"query","required":false,"description":"Filter singlePayment (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[singlePayment][notIn]","in":"query","required":false,"description":"Filter singlePayment (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[singlePayment][between]","in":"query","required":false,"description":"Filter singlePayment (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","outboundPaymentNumber","-outboundPaymentNumber","paymentDate","-paymentDate","paymentCurrency","-paymentCurrency","paymentType","-paymentType","status","-status","approvalStatus","-approvalStatus","applicationStatus","-applicationStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","outboundPaymentNumber","description","paymentDate","paymentCurrency","paymentType","status","approvalStatus","applicationStatus","paymentId","externalId","origin","singlePayment","paymentAccountName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/outboundPaymentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List outbound payments","description":"Lists outbound payments, without their lines. To get the lines, use GET accounting/outbound-payments/:id or POST accounting/outbound-payments/search.","tags":["accountingOutboundPayments"]},"post":{"operationId":"createOutboundPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createOutboundPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DOCUMENT_NOT_PAYABLE, PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT, DOCUMENT_CURRENCY_MISMATCH","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createOutboundPaymentInput"}}}},"summary":"Create an outbound payment","description":"Creates an outbound payment. The payment pays vendor bills or expense reports. No money is sent, and the payment starts in status 'manuallyRecorded'.\n\nEach payment item pays one document. documentType sets the kind of document, and every item in the payment pays that kind. Every document must be approved and not voided, every item on an expense report must be reimbursable, all documents must be in one currency, and no payment item can pay more than its document's open amount.\n\nThe response contains only the new payment's id. To see the payment, use GET accounting/outbound-payments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingOutboundPayments"]}},"/accounting/payroll-templates":{"post":{"operationId":"createPayrollTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPayrollTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DUPLICATE_NAME, NO_CATEGORIES, DUPLICATE_CATEGORY_NAME, MULTIPLE_NET_PAY_CATEGORIES, AGGREGATION_REQUIRES_EMPLOYEE_GROUPING, NO_ENTITIES, NO_CATEGORY_ACCOUNTS, TAGS_REQUIRE_CATEGORY_AGGREGATION, INVALID_CATEGORY_TAG","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPayrollTemplateInput"}}}},"summary":"Create a payroll template","description":"Creates a payroll template with its categories and entity assignments. The template serves the legal entities in entityIds, and each category names the debit and credit accounts for one kind of payroll amount.\n\nThe name must be unique within the tenant, or the request fails with DUPLICATE_NAME. Send at least one category and at least one legal entity. Category names must be unique within the template, and at least one category must name a debit or credit account.\n\nstatus isn't an input. The template is 'active' when it has an active netPay category and an active grossPay category, and 'inactive' otherwise.\n\nThe response contains only the new template's id. To see the template, use GET accounting/payroll-templates/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPayrollTemplates"]},"get":{"operationId":"payrollTemplates","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[groupBy]","in":"query","required":false,"description":"Filter groupBy (equality)","schema":{"type":"string"}},{"name":"filter[groupBy][ne]","in":"query","required":false,"description":"Filter groupBy (ne)","schema":{"type":"string"}},{"name":"filter[groupBy][gt]","in":"query","required":false,"description":"Filter groupBy (gt)","schema":{"type":"string"}},{"name":"filter[groupBy][gte]","in":"query","required":false,"description":"Filter groupBy (gte)","schema":{"type":"string"}},{"name":"filter[groupBy][lt]","in":"query","required":false,"description":"Filter groupBy (lt)","schema":{"type":"string"}},{"name":"filter[groupBy][lte]","in":"query","required":false,"description":"Filter groupBy (lte)","schema":{"type":"string"}},{"name":"filter[groupBy][in]","in":"query","required":false,"description":"Filter groupBy (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupBy][notIn]","in":"query","required":false,"description":"Filter groupBy (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupBy][between]","in":"query","required":false,"description":"Filter groupBy (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[groupBy][like]","in":"query","required":false,"description":"Filter groupBy (like)","schema":{"type":"string"}},{"name":"filter[journalEntryDate]","in":"query","required":false,"description":"Filter journalEntryDate (equality)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][ne]","in":"query","required":false,"description":"Filter journalEntryDate (ne)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][gt]","in":"query","required":false,"description":"Filter journalEntryDate (gt)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][gte]","in":"query","required":false,"description":"Filter journalEntryDate (gte)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][lt]","in":"query","required":false,"description":"Filter journalEntryDate (lt)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][lte]","in":"query","required":false,"description":"Filter journalEntryDate (lte)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][in]","in":"query","required":false,"description":"Filter journalEntryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryDate][notIn]","in":"query","required":false,"description":"Filter journalEntryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryDate][between]","in":"query","required":false,"description":"Filter journalEntryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[journalEntryDate][like]","in":"query","required":false,"description":"Filter journalEntryDate (like)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy]","in":"query","required":false,"description":"Filter journalEntryGroupBy (equality)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][ne]","in":"query","required":false,"description":"Filter journalEntryGroupBy (ne)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][gt]","in":"query","required":false,"description":"Filter journalEntryGroupBy (gt)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][gte]","in":"query","required":false,"description":"Filter journalEntryGroupBy (gte)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][lt]","in":"query","required":false,"description":"Filter journalEntryGroupBy (lt)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][lte]","in":"query","required":false,"description":"Filter journalEntryGroupBy (lte)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][in]","in":"query","required":false,"description":"Filter journalEntryGroupBy (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryGroupBy][notIn]","in":"query","required":false,"description":"Filter journalEntryGroupBy (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryGroupBy][between]","in":"query","required":false,"description":"Filter journalEntryGroupBy (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[journalEntryGroupBy][like]","in":"query","required":false,"description":"Filter journalEntryGroupBy (like)","schema":{"type":"string"}},{"name":"filter[deductionsType]","in":"query","required":false,"description":"Filter deductionsType (equality)","schema":{"type":"string"}},{"name":"filter[deductionsType][ne]","in":"query","required":false,"description":"Filter deductionsType (ne)","schema":{"type":"string"}},{"name":"filter[deductionsType][gt]","in":"query","required":false,"description":"Filter deductionsType (gt)","schema":{"type":"string"}},{"name":"filter[deductionsType][gte]","in":"query","required":false,"description":"Filter deductionsType (gte)","schema":{"type":"string"}},{"name":"filter[deductionsType][lt]","in":"query","required":false,"description":"Filter deductionsType (lt)","schema":{"type":"string"}},{"name":"filter[deductionsType][lte]","in":"query","required":false,"description":"Filter deductionsType (lte)","schema":{"type":"string"}},{"name":"filter[deductionsType][in]","in":"query","required":false,"description":"Filter deductionsType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deductionsType][notIn]","in":"query","required":false,"description":"Filter deductionsType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deductionsType][between]","in":"query","required":false,"description":"Filter deductionsType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deductionsType][like]","in":"query","required":false,"description":"Filter deductionsType (like)","schema":{"type":"string"}},{"name":"filter[source]","in":"query","required":false,"description":"Filter source (equality)","schema":{"type":"string"}},{"name":"filter[source][ne]","in":"query","required":false,"description":"Filter source (ne)","schema":{"type":"string"}},{"name":"filter[source][gt]","in":"query","required":false,"description":"Filter source (gt)","schema":{"type":"string"}},{"name":"filter[source][gte]","in":"query","required":false,"description":"Filter source (gte)","schema":{"type":"string"}},{"name":"filter[source][lt]","in":"query","required":false,"description":"Filter source (lt)","schema":{"type":"string"}},{"name":"filter[source][lte]","in":"query","required":false,"description":"Filter source (lte)","schema":{"type":"string"}},{"name":"filter[source][in]","in":"query","required":false,"description":"Filter source (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[source][notIn]","in":"query","required":false,"description":"Filter source (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[source][between]","in":"query","required":false,"description":"Filter source (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[source][like]","in":"query","required":false,"description":"Filter source (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","groupBy","-groupBy","journalEntryDate","-journalEntryDate","journalEntryGroupBy","-journalEntryGroupBy","deductionsType","-deductionsType","source","-source","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","groupBy","journalEntryDate","journalEntryGroupBy","deductionsType","source","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/payrollTemplatesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List payroll templates","description":"Lists payroll templates, without their categories. To get the categories, use GET accounting/payroll-templates/:id or POST accounting/payroll-templates/search.","tags":["accountingPayrollTemplates"]}},"/accounting/vendor-bills/{id}/reject":{"post":{"operationId":"rejectVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED, BILL_ALREADY_VOIDED, BILL_ALREADY_REVERSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to reject.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectVendorBillInput"}}}},"summary":"Reject a vendor bill","description":"Rejects a vendor bill. The rejection goes through your tenant's approval policy. You can send an optional reviewMessage, and the response is the bill's status afterward.\n\nRejecting doesn't void or delete the bill, and the bill keeps its number and its audit trail. A bill rejected from 'pendingApproval' has no journal entry. Rejecting pending changes to an approved bill undoes the changes, and the bill stays 'approved' with its journal entry.\n\nWhether you may reject the bill depends on your approval policy. When the policy refuses, the request fails with APPROVAL_FAILED, and reason has the policy's message.","tags":["accountingVendorBills"]}},"/accounting/expense-categories/{id}":{"patch":{"operationId":"updateExpenseCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateExpenseCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_CATEGORY, DUPLICATE_DISTANCE_CATEGORY, REFERENCE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense category you want to update.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateExpenseCategoryInput"}}}},"summary":"Update an expense category","description":"Updates an expense category with the fields you send. A field you leave out keeps its current value. entityIds and accountIds are lists.\n\nA list you send replaces the whole list, so include every item you want to keep.\n\nA reimbursable category must keep at least one account, so an empty accountIds fails. Every linked account must have an account subtype that is enabled for expense reports, even when you leave accountIds out. Both failures return an error that has no code in the error list.\n\nSend entityIds or accountIds to change the category's legal entities or general ledger accounts.\n\nThe name must stay unique within the tenant. At most one active distance ('Dis') category can exist for each reimbursable value.\n\nWhen the update leaves the category with no prepaid account, draft amortization schedules on its expense items are deleted.\n\nThe response is empty. Read the updated record with GET accounting/expense-categories/:id.","tags":["accountingExpenseCategories"]},"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"]}},"/accounting/vendor-bills/{id}":{"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"]},"delete":{"operationId":"deleteVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_BILL_PAID, WITHHOLDING_REMITTED, POSTED_AMORTIZATION, POSTING_PERIOD_CLOSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."},"paymentStatus":{"type":"string","description":"The payment status blocking the delete."}},"additionalProperties":false,"required":["vendorBillNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."},"paymentStatus":{"type":"string","description":"The payment status blocking the delete."}},"additionalProperties":false,"required":["vendorBillNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."},"paymentStatus":{"type":"string","description":"The payment status blocking the delete."}},"additionalProperties":false,"required":["vendorBillNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to delete.","example":"62c06eff-ba85-461d-b4e7-7a3f1d3e2e4e"}],"summary":"Delete a vendor bill","description":"Deletes a vendor bill. The bill and its journal entry are deleted, not reversed. To keep a bill that has a journal entry, and its audit trail, use POST accounting/vendor-bills/:id/void instead.\n\nA bill can't be deleted when it is paid, even in part, when it has a pending payment, or when its withheld tax has been remitted. It also can't be deleted when it has amortization schedule lines with journal entries, or when the accounting period of its journal entry is closed or locked. A bill whose total is zero skips the payment and accounting-period checks.\n\nThe response is empty.","tags":["accountingVendorBills"]}},"/accounting/vendors/{id}/deactivate":{"post":{"operationId":"deactivateVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deactivateVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_IS_DRAFT, ALREADY_IN_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the vendor to deactivate; bound from the :id path segment.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deactivateVendorInput"}}}},"summary":"Deactivate a vendor","description":"Deactivates a vendor. The vendor's bills, vendor credits, and payments stay as they are, and the vendor no longer appears when you choose a vendor in the application.\n\nA vendor with history can't be deleted with DELETE accounting/vendors/:id. Deactivating is the alternative.\n\nThe response is empty. To see the vendor, use GET accounting/vendors/:id.","tags":["accountingVendors"]}},"/accounting/vendor-credits/{id}":{"delete":{"operationId":"deleteVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_CREDIT_APPLIED, POSTING_PERIOD_CLOSED, AMORTIZATION_IN_PROGRESS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_CREDIT_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."},"status":{"type":"string","description":"The application status blocking the delete."}},"additionalProperties":false,"required":["vendorCreditNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_CREDIT_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."},"status":{"type":"string","description":"The application status blocking the delete."}},"additionalProperties":false,"required":["vendorCreditNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_CREDIT_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."},"status":{"type":"string","description":"The application status blocking the delete."}},"additionalProperties":false,"required":["vendorCreditNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor credit you want to delete.","example":"d52e1c69-3fa8-4b17-9e24-8c6fa0315bd7"}],"summary":"Delete a vendor credit","description":"Deletes a vendor credit. Only a credit that isn't applied to any vendor bill can be deleted. To delete a credit that is applied, even in part, first use POST accounting/vendor-credits/:id/unapply.\n\nA credit also can't be deleted once one of its amortization schedules has started, or when the accounting period of its journal entry is closed or locked.\n\nThe response is empty.","tags":["accountingVendorCredits"]},"patch":{"operationId":"updateVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, LINE_NOT_FOUND, REFERENCE_NUMBER_NOT_UNIQUE, 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":"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":"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":"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"]}},"/accounting/payroll-details/search":{"post":{"operationId":"searchPayrollDetail","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPayrollDetailOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPayrollDetailInput"}}}},"summary":"Search payroll details","description":"Searches payroll details, with their lines. Each match is the same record that GET accounting/payroll-details/:id returns.","tags":["accountingPayrollDetails"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/expense-categories":{"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"]},"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"]}},"/accounting/purchase-requests/{id}/approve":{"post":{"operationId":"approvePurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approvePurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase request you want to approve.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvePurchaseRequestInput"}}}},"summary":"Approve a purchase request","description":"Approves a purchase request. The approval goes through your tenant's approval policy, and the response is the purchase request's status afterward.\n\nWith no approvers configured, the request goes straight to 'approved'. With a multi-step policy, it moves on one step and stays 'pendingApproval'.","tags":["accountingPurchaseRequests"]}},"/accounting/vendors/search":{"post":{"operationId":"searchVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchVendorInput"}}}},"summary":"Search vendors","description":"Searches vendors. You can filter by name, number, type, status, legal entity, contact email, or external identifier. The vendorName, mainContactEmail, and entityId filters are available here and not on GET accounting/vendors.","tags":["accountingVendors"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/vendor-bills/{id}/void":{"post":{"operationId":"voidVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, BILL_NOT_APPROVED, BILL_ALREADY_VOIDED, BILL_PAID, WITHHOLDING_REMITTED, BILL_NOT_POSTED, POSTING_PERIOD_CLOSED, BILL_ALREADY_REVERSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to void.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidVendorBillInput"}}}},"summary":"Void a vendor bill","description":"Voids a vendor bill. Backs the vendor bill out of the general ledger by voiding its journal entry. No reversing journal entry is created. Voiding isn't deleting: the bill keeps its number and its audit trail.\n\nOnly an approved bill with a journal entry and no payments can be voided, and its accounting period must be open. To back a bill out on a date you choose, for example when its period is closed, use POST accounting/vendor-bills/:id/reverse.\n\nA voided bill can't be approved, rejected, voided again or reversed. The response is empty.","tags":["accountingVendorBills"]}},"/accounting/employee-advances/{id}/issue":{"post":{"operationId":"issueEmployeeAdvanceRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/issueEmployeeAdvanceRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REQUEST_NOT_FOUND, NOT_APPROVED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the approved advance request to issue.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/issueEmployeeAdvanceRequestInput"}}}},"summary":"Issue an employee advance request","description":"Issues the payment for an approved employee advance request. Creates the outbound payment and its journal entry for an approved request, links the payment to the request, and sets the request's status to 'issued'.\n\nOnly a request in 'approved' status can be issued. For any other status, the request fails with NOT_APPROVED.\n\nThe accounts and currency come from the request's category and legal entity, not from the request body. The request fails if the category has no bank and offset account for the legal entity's leading book, with an error that has no code in the error list. The response contains the payment's id. To see the payment, use GET accounting/outbound-payments/:id.","tags":["accountingEmployeeAdvances"]}},"/accounting/employee-advances/{id}":{"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"]},"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"]}},"/accounting/vendors/{id}":{"patch":{"operationId":"updateVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: 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"]},"delete":{"operationId":"deleteVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_IN_USE, VENDOR_HAS_JOURNAL_ENTRIES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"vendorBillCount":{"type":"number","description":"How many vendor bills still reference it."},"vendorCreditCount":{"type":"number","description":"How many vendor credits still reference it."},"payrollPaymentCount":{"type":"number","description":"How many payroll payment applications still reference it."}},"additionalProperties":false,"required":["vendorNumber","vendorBillCount","vendorCreditCount","payrollPaymentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"journalEntryCount":{"type":"number","description":"How many journal entry lines reference its business partner."}},"additionalProperties":false,"required":["vendorNumber","journalEntryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"vendorBillCount":{"type":"number","description":"How many vendor bills still reference it."},"vendorCreditCount":{"type":"number","description":"How many vendor credits still reference it."},"payrollPaymentCount":{"type":"number","description":"How many payroll payment applications still reference it."}},"additionalProperties":false,"required":["vendorNumber","vendorBillCount","vendorCreditCount","payrollPaymentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"journalEntryCount":{"type":"number","description":"How many journal entry lines reference its business partner."}},"additionalProperties":false,"required":["vendorNumber","journalEntryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"vendorBillCount":{"type":"number","description":"How many vendor bills still reference it."},"vendorCreditCount":{"type":"number","description":"How many vendor credits still reference it."},"payrollPaymentCount":{"type":"number","description":"How many payroll payment applications still reference it."}},"additionalProperties":false,"required":["vendorNumber","vendorBillCount","vendorCreditCount","payrollPaymentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"journalEntryCount":{"type":"number","description":"How many journal entry lines reference its business partner."}},"additionalProperties":false,"required":["vendorNumber","journalEntryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor you want to delete.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"summary":"Delete a vendor","description":"Deletes a vendor. The vendor's bank details and remittance address are deleted with it. Its business partner is deleted too, unless a customer uses the same business partner.\n\nA vendor with history can't be deleted. While vendor bills, vendor credits, or payroll payments refer to the vendor, the request fails with VENDOR_IN_USE. When journal entries exist for its business partner, the request fails with VENDOR_HAS_JOURNAL_ENTRIES.\n\nThe response is empty. To keep the history and hide the vendor, use POST accounting/vendors/:id/deactivate.","tags":["accountingVendors"]}},"/accounting/vendor-credits/search":{"post":{"operationId":"searchVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchVendorCreditInput"}}}},"summary":"Search vendor credits","description":"Searches vendor credits. Each match is the same full record that GET accounting/vendor-credits/:id returns, with its line items and their amortization schedules.","tags":["accountingVendorCredits"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/payroll-payments":{"post":{"operationId":"createPayrollPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPayrollPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_APPLICATIONS, UNSUPPORTED_PAYMENT_TYPE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The payment number. Always empty here, since a create assigns no number."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The payment number. Always empty here, since a create assigns no number."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The payment number. Always empty here, since a create assigns no number."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPayrollPaymentInput"}}}},"summary":"Create a payroll payment","description":"Creates a payroll payment. Each application names a payroll detail, the payee, and the amount paid.\n\nA payment that would overpay a payroll detail, for one payee or in total, is refused with an error that has no code in the error list.\n\nThe response contains only the new payment's id. To see the payment, use GET accounting/payroll-payments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPayrollPayments"]},"get":{"operationId":"payrollPayments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber]","in":"query","required":false,"description":"Filter payrollPaymentNumber (equality)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][ne]","in":"query","required":false,"description":"Filter payrollPaymentNumber (ne)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][gt]","in":"query","required":false,"description":"Filter payrollPaymentNumber (gt)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][gte]","in":"query","required":false,"description":"Filter payrollPaymentNumber (gte)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][lt]","in":"query","required":false,"description":"Filter payrollPaymentNumber (lt)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][lte]","in":"query","required":false,"description":"Filter payrollPaymentNumber (lte)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][in]","in":"query","required":false,"description":"Filter payrollPaymentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollPaymentNumber][notIn]","in":"query","required":false,"description":"Filter payrollPaymentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollPaymentNumber][between]","in":"query","required":false,"description":"Filter payrollPaymentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[payrollPaymentNumber][like]","in":"query","required":false,"description":"Filter payrollPaymentNumber (like)","schema":{"type":"string"}},{"name":"filter[paymentDate]","in":"query","required":false,"description":"Filter paymentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][ne]","in":"query","required":false,"description":"Filter paymentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gt]","in":"query","required":false,"description":"Filter paymentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gte]","in":"query","required":false,"description":"Filter paymentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lt]","in":"query","required":false,"description":"Filter paymentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lte]","in":"query","required":false,"description":"Filter paymentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][in]","in":"query","required":false,"description":"Filter paymentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][notIn]","in":"query","required":false,"description":"Filter paymentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][between]","in":"query","required":false,"description":"Filter paymentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentCurrency]","in":"query","required":false,"description":"Filter paymentCurrency (equality)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][ne]","in":"query","required":false,"description":"Filter paymentCurrency (ne)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][gt]","in":"query","required":false,"description":"Filter paymentCurrency (gt)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][gte]","in":"query","required":false,"description":"Filter paymentCurrency (gte)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][lt]","in":"query","required":false,"description":"Filter paymentCurrency (lt)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][lte]","in":"query","required":false,"description":"Filter paymentCurrency (lte)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][in]","in":"query","required":false,"description":"Filter paymentCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentCurrency][notIn]","in":"query","required":false,"description":"Filter paymentCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentCurrency][between]","in":"query","required":false,"description":"Filter paymentCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentCurrency][like]","in":"query","required":false,"description":"Filter paymentCurrency (like)","schema":{"type":"string"}},{"name":"filter[paymentType]","in":"query","required":false,"description":"Filter paymentType (equality)","schema":{"type":"string"}},{"name":"filter[paymentType][ne]","in":"query","required":false,"description":"Filter paymentType (ne)","schema":{"type":"string"}},{"name":"filter[paymentType][gt]","in":"query","required":false,"description":"Filter paymentType (gt)","schema":{"type":"string"}},{"name":"filter[paymentType][gte]","in":"query","required":false,"description":"Filter paymentType (gte)","schema":{"type":"string"}},{"name":"filter[paymentType][lt]","in":"query","required":false,"description":"Filter paymentType (lt)","schema":{"type":"string"}},{"name":"filter[paymentType][lte]","in":"query","required":false,"description":"Filter paymentType (lte)","schema":{"type":"string"}},{"name":"filter[paymentType][in]","in":"query","required":false,"description":"Filter paymentType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][notIn]","in":"query","required":false,"description":"Filter paymentType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][between]","in":"query","required":false,"description":"Filter paymentType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentType][like]","in":"query","required":false,"description":"Filter paymentType (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[externalId]","in":"query","required":false,"description":"Filter externalId (equality)","schema":{"type":"string"}},{"name":"filter[externalId][ne]","in":"query","required":false,"description":"Filter externalId (ne)","schema":{"type":"string"}},{"name":"filter[externalId][gt]","in":"query","required":false,"description":"Filter externalId (gt)","schema":{"type":"string"}},{"name":"filter[externalId][gte]","in":"query","required":false,"description":"Filter externalId (gte)","schema":{"type":"string"}},{"name":"filter[externalId][lt]","in":"query","required":false,"description":"Filter externalId (lt)","schema":{"type":"string"}},{"name":"filter[externalId][lte]","in":"query","required":false,"description":"Filter externalId (lte)","schema":{"type":"string"}},{"name":"filter[externalId][in]","in":"query","required":false,"description":"Filter externalId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][notIn]","in":"query","required":false,"description":"Filter externalId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][between]","in":"query","required":false,"description":"Filter externalId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalId][like]","in":"query","required":false,"description":"Filter externalId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","payrollPaymentNumber","-payrollPaymentNumber","paymentDate","-paymentDate","paymentCurrency","-paymentCurrency","paymentType","-paymentType","status","-status","totalPaid","-totalPaid","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","payrollPaymentNumber","paymentDate","paymentCurrency","paymentType","status","approvalStatus","description","totalPaid","externalId","paymentAccountName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/payrollPaymentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List payroll payments","description":"Lists payroll payments, without their applications. To get the applications, use GET accounting/payroll-payments/:id or POST accounting/payroll-payments/search.","tags":["accountingPayrollPayments"]}},"/accounting/expense-reports":{"get":{"operationId":"expenseReports","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[expenseNumber]","in":"query","required":false,"description":"Filter expenseNumber (equality)","schema":{"type":"string"}},{"name":"filter[expenseNumber][ne]","in":"query","required":false,"description":"Filter expenseNumber (ne)","schema":{"type":"string"}},{"name":"filter[expenseNumber][gt]","in":"query","required":false,"description":"Filter expenseNumber (gt)","schema":{"type":"string"}},{"name":"filter[expenseNumber][gte]","in":"query","required":false,"description":"Filter expenseNumber (gte)","schema":{"type":"string"}},{"name":"filter[expenseNumber][lt]","in":"query","required":false,"description":"Filter expenseNumber (lt)","schema":{"type":"string"}},{"name":"filter[expenseNumber][lte]","in":"query","required":false,"description":"Filter expenseNumber (lte)","schema":{"type":"string"}},{"name":"filter[expenseNumber][in]","in":"query","required":false,"description":"Filter expenseNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expenseNumber][notIn]","in":"query","required":false,"description":"Filter expenseNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expenseNumber][between]","in":"query","required":false,"description":"Filter expenseNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[expenseNumber][like]","in":"query","required":false,"description":"Filter expenseNumber (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[paymentStatus]","in":"query","required":false,"description":"Filter paymentStatus (equality)","schema":{"type":"string"}},{"name":"filter[paymentStatus][ne]","in":"query","required":false,"description":"Filter paymentStatus (ne)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gt]","in":"query","required":false,"description":"Filter paymentStatus (gt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gte]","in":"query","required":false,"description":"Filter paymentStatus (gte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lt]","in":"query","required":false,"description":"Filter paymentStatus (lt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lte]","in":"query","required":false,"description":"Filter paymentStatus (lte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][in]","in":"query","required":false,"description":"Filter paymentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][notIn]","in":"query","required":false,"description":"Filter paymentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][between]","in":"query","required":false,"description":"Filter paymentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentStatus][like]","in":"query","required":false,"description":"Filter paymentStatus (like)","schema":{"type":"string"}},{"name":"filter[submittedDate]","in":"query","required":false,"description":"Filter submittedDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][ne]","in":"query","required":false,"description":"Filter submittedDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][gt]","in":"query","required":false,"description":"Filter submittedDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][gte]","in":"query","required":false,"description":"Filter submittedDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][lt]","in":"query","required":false,"description":"Filter submittedDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][lte]","in":"query","required":false,"description":"Filter submittedDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][in]","in":"query","required":false,"description":"Filter submittedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submittedDate][notIn]","in":"query","required":false,"description":"Filter submittedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submittedDate][between]","in":"query","required":false,"description":"Filter submittedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reimbursementCurrency]","in":"query","required":false,"description":"Filter reimbursementCurrency (equality)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][ne]","in":"query","required":false,"description":"Filter reimbursementCurrency (ne)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][gt]","in":"query","required":false,"description":"Filter reimbursementCurrency (gt)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][gte]","in":"query","required":false,"description":"Filter reimbursementCurrency (gte)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][lt]","in":"query","required":false,"description":"Filter reimbursementCurrency (lt)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][lte]","in":"query","required":false,"description":"Filter reimbursementCurrency (lte)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][in]","in":"query","required":false,"description":"Filter reimbursementCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reimbursementCurrency][notIn]","in":"query","required":false,"description":"Filter reimbursementCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reimbursementCurrency][between]","in":"query","required":false,"description":"Filter reimbursementCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reimbursementCurrency][like]","in":"query","required":false,"description":"Filter reimbursementCurrency (like)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId]","in":"query","required":false,"description":"Filter externalExpenseReportId (equality)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][ne]","in":"query","required":false,"description":"Filter externalExpenseReportId (ne)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][gt]","in":"query","required":false,"description":"Filter externalExpenseReportId (gt)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][gte]","in":"query","required":false,"description":"Filter externalExpenseReportId (gte)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][lt]","in":"query","required":false,"description":"Filter externalExpenseReportId (lt)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][lte]","in":"query","required":false,"description":"Filter externalExpenseReportId (lte)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][in]","in":"query","required":false,"description":"Filter externalExpenseReportId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalExpenseReportId][notIn]","in":"query","required":false,"description":"Filter externalExpenseReportId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalExpenseReportId][between]","in":"query","required":false,"description":"Filter externalExpenseReportId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalExpenseReportId][like]","in":"query","required":false,"description":"Filter externalExpenseReportId (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","expenseNumber","-expenseNumber","status","-status","paymentStatus","-paymentStatus","submittedDate","-submittedDate","reimbursementCurrency","-reimbursementCurrency","reimbursableTotal","-reimbursableTotal","openAmount","-openAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","expenseNumber","status","paymentStatus","submittedDate","reimbursementCurrency","reimbursableTotal","reimbursableTotalNetAmount","amountPaid","openAmount","pendingAmount","containsBillableItem","pendingPayment","externalExpenseReportId","origin","employeeName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/expenseReportsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List expense reports","description":"Lists expense reports, without their expense items. To get the items, use GET accounting/expense-reports/:id or POST accounting/expense-reports/search.","tags":["accountingExpenseReports"]},"post":{"operationId":"createExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: 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, 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":"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":"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":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of items the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_REQUIREMENT_UNMET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category that imposes the requirement."},"requirement":{"type":"string","description":"What is missing. Either 'attachment' or 'attendees'."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","requirement","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the inactive category."},"referenceId":{"type":"string","description":"The identifier of the inactive category."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NEEDS_CATEGORY_OR_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"source":{"type":"string","description":"Where the item came from. Either 'new', supplied by this request, or 'existing', already on the report."},"lineIndex":{"type":"number","description":"The zero-based position of the item, within the array that carried it or within the report's stored items."}},"additionalProperties":false,"required":["source","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createExpenseReportInput"}}}},"summary":"Create an expense report","description":"Creates an expense report. The report is created with its expense items and starts in status 'pendingApproval'.\n\nThe response contains only the new report's id. Read the record with GET accounting/expense-reports/:id, where expenseNumber appears once it is assigned.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingExpenseReports"]}},"/accounting/payroll-payments/search":{"post":{"operationId":"searchPayrollPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPayrollPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPayrollPaymentInput"}}}},"summary":"Search payroll payments","description":"Searches payroll payments, with their applications. Only outbound payments that pay payroll details are searched, so the results are a subset of what POST accounting/outbound-payments/search returns.","tags":["accountingPayrollPayments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/advance-payment-categories/search":{"post":{"operationId":"searchAdvancePaymentCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAdvancePaymentCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAdvancePaymentCategoriesInput"}}}},"summary":"Search advance payment categories","description":"Searches advance payment categories. The filters are legal entity, name, and status. Matching categories are returned newest first.\n\nA legal entity has at most one category, so filters.entityId returns at most one item.","tags":["accountingAdvancePaymentCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/purchase-requests/search":{"post":{"operationId":"searchPurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPurchaseRequestInput"}}}},"summary":"Search purchase requests","description":"Searches purchase requests. Each match is the full purchase request with its lines. The vendorId, vendorName, entityId, entityName, and departmentId filters are available here and not on GET accounting/purchase-requests.","tags":["accountingPurchaseRequests"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/payroll-templates/search":{"post":{"operationId":"searchPayrollTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPayrollTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPayrollTemplateInput"}}}},"summary":"Search payroll templates","description":"Searches payroll templates. Each match is the same record that GET accounting/payroll-templates/:id returns. Search here to find a template by name or by a legal entity it serves.","tags":["accountingPayrollTemplates"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/expense-reports/{id}/reject":{"post":{"operationId":"rejectExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense report you want to reject.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectExpenseReportInput"}}}},"summary":"Reject an expense report","description":"Rejects an expense report. reviewMessage is recorded with the decision, and the response is the status that results.\n\nFor a report that is already rejected, the request fails with STATUS_CONFLICT.\n\nA rejected report is kept, with its number and audit trail. To withdraw a submission and delete the report, use POST accounting/expense-reports/:id/cancel-submission.","tags":["accountingExpenseReports"]}},"/accounting/advance-payment-categories":{"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"]},"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"]}},"/accounting/payroll-details":{"get":{"operationId":"payrollDetails","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber]","in":"query","required":false,"description":"Filter payrollDetailNumber (equality)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][ne]","in":"query","required":false,"description":"Filter payrollDetailNumber (ne)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][gt]","in":"query","required":false,"description":"Filter payrollDetailNumber (gt)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][gte]","in":"query","required":false,"description":"Filter payrollDetailNumber (gte)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][lt]","in":"query","required":false,"description":"Filter payrollDetailNumber (lt)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][lte]","in":"query","required":false,"description":"Filter payrollDetailNumber (lte)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][in]","in":"query","required":false,"description":"Filter payrollDetailNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollDetailNumber][notIn]","in":"query","required":false,"description":"Filter payrollDetailNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollDetailNumber][between]","in":"query","required":false,"description":"Filter payrollDetailNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[payrollDetailNumber][like]","in":"query","required":false,"description":"Filter payrollDetailNumber (like)","schema":{"type":"string"}},{"name":"filter[periodName]","in":"query","required":false,"description":"Filter periodName (equality)","schema":{"type":"string"}},{"name":"filter[periodName][ne]","in":"query","required":false,"description":"Filter periodName (ne)","schema":{"type":"string"}},{"name":"filter[periodName][gt]","in":"query","required":false,"description":"Filter periodName (gt)","schema":{"type":"string"}},{"name":"filter[periodName][gte]","in":"query","required":false,"description":"Filter periodName (gte)","schema":{"type":"string"}},{"name":"filter[periodName][lt]","in":"query","required":false,"description":"Filter periodName (lt)","schema":{"type":"string"}},{"name":"filter[periodName][lte]","in":"query","required":false,"description":"Filter periodName (lte)","schema":{"type":"string"}},{"name":"filter[periodName][in]","in":"query","required":false,"description":"Filter periodName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][notIn]","in":"query","required":false,"description":"Filter periodName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][between]","in":"query","required":false,"description":"Filter periodName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[periodName][like]","in":"query","required":false,"description":"Filter periodName (like)","schema":{"type":"string"}},{"name":"filter[payrollDate]","in":"query","required":false,"description":"Filter payrollDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][ne]","in":"query","required":false,"description":"Filter payrollDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][gt]","in":"query","required":false,"description":"Filter payrollDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][gte]","in":"query","required":false,"description":"Filter payrollDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][lt]","in":"query","required":false,"description":"Filter payrollDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][lte]","in":"query","required":false,"description":"Filter payrollDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][in]","in":"query","required":false,"description":"Filter payrollDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollDate][notIn]","in":"query","required":false,"description":"Filter payrollDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollDate][between]","in":"query","required":false,"description":"Filter payrollDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[grouping]","in":"query","required":false,"description":"Filter grouping (equality)","schema":{"type":"string"}},{"name":"filter[grouping][ne]","in":"query","required":false,"description":"Filter grouping (ne)","schema":{"type":"string"}},{"name":"filter[grouping][gt]","in":"query","required":false,"description":"Filter grouping (gt)","schema":{"type":"string"}},{"name":"filter[grouping][gte]","in":"query","required":false,"description":"Filter grouping (gte)","schema":{"type":"string"}},{"name":"filter[grouping][lt]","in":"query","required":false,"description":"Filter grouping (lt)","schema":{"type":"string"}},{"name":"filter[grouping][lte]","in":"query","required":false,"description":"Filter grouping (lte)","schema":{"type":"string"}},{"name":"filter[grouping][in]","in":"query","required":false,"description":"Filter grouping (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[grouping][notIn]","in":"query","required":false,"description":"Filter grouping (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[grouping][between]","in":"query","required":false,"description":"Filter grouping (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[grouping][like]","in":"query","required":false,"description":"Filter grouping (like)","schema":{"type":"string"}},{"name":"filter[paymentStatus]","in":"query","required":false,"description":"Filter paymentStatus (equality)","schema":{"type":"string"}},{"name":"filter[paymentStatus][ne]","in":"query","required":false,"description":"Filter paymentStatus (ne)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gt]","in":"query","required":false,"description":"Filter paymentStatus (gt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gte]","in":"query","required":false,"description":"Filter paymentStatus (gte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lt]","in":"query","required":false,"description":"Filter paymentStatus (lt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lte]","in":"query","required":false,"description":"Filter paymentStatus (lte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][in]","in":"query","required":false,"description":"Filter paymentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][notIn]","in":"query","required":false,"description":"Filter paymentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][between]","in":"query","required":false,"description":"Filter paymentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentStatus][like]","in":"query","required":false,"description":"Filter paymentStatus (like)","schema":{"type":"string"}},{"name":"filter[isImported]","in":"query","required":false,"description":"Filter isImported (equality)","schema":{"type":"boolean"}},{"name":"filter[isImported][ne]","in":"query","required":false,"description":"Filter isImported (ne)","schema":{"type":"boolean"}},{"name":"filter[isImported][gt]","in":"query","required":false,"description":"Filter isImported (gt)","schema":{"type":"boolean"}},{"name":"filter[isImported][gte]","in":"query","required":false,"description":"Filter isImported (gte)","schema":{"type":"boolean"}},{"name":"filter[isImported][lt]","in":"query","required":false,"description":"Filter isImported (lt)","schema":{"type":"boolean"}},{"name":"filter[isImported][lte]","in":"query","required":false,"description":"Filter isImported (lte)","schema":{"type":"boolean"}},{"name":"filter[isImported][in]","in":"query","required":false,"description":"Filter isImported (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isImported][notIn]","in":"query","required":false,"description":"Filter isImported (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isImported][between]","in":"query","required":false,"description":"Filter isImported (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","payrollDetailNumber","-payrollDetailNumber","periodName","-periodName","payrollDate","-payrollDate","startDate","-startDate","endDate","-endDate","currency","-currency","grouping","-grouping","paymentStatus","-paymentStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","payrollDetailNumber","description","periodName","payrollDate","startDate","endDate","currency","grouping","paymentStatus","isImported","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/payrollDetailsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List payroll details","description":"Lists payroll details, without their lines. To get the lines, use GET accounting/payroll-details/:id or POST accounting/payroll-details/search.","tags":["accountingPayrollDetails"]},"post":{"operationId":"createPayrollDetail","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPayrollDetailOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: 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","content":{"application/json":{"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already 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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPayrollDetailInput"}}}},"summary":"Create a payroll detail","description":"Creates a payroll detail. The payroll detail belongs to one legal entity and takes its categories, journal entry date rule, and clearing account from the payroll template you name.\n\nGross pay must equal deductions plus net pay across all lines, or the request fails with AMOUNT_NOT_BALANCED.\n\nThe journal entry date comes from the template's journal entry date rule, either payrollDate or endDate. The legal entity must have a default transactions book (NO_ACCOUNTING_BOOK). A period in that book must cover the journal entry date (NO_ACCOUNTING_PERIOD), and that period must be open (POSTING_PERIOD_CLOSED).\n\nThe response contains only the new payroll detail's id. To see it, use GET accounting/payroll-details/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPayrollDetails"]}},"/accounting/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, 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":"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":"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":"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/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/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","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","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":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` 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/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/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, 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":"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":"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":"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"}]}},"/fixed-assets/depreciation-schedules":{"get":{"operationId":"depreciationSchedules","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[scheduleNumber]","in":"query","required":false,"description":"Filter scheduleNumber (equality)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][ne]","in":"query","required":false,"description":"Filter scheduleNumber (ne)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][gt]","in":"query","required":false,"description":"Filter scheduleNumber (gt)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][gte]","in":"query","required":false,"description":"Filter scheduleNumber (gte)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][lt]","in":"query","required":false,"description":"Filter scheduleNumber (lt)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][lte]","in":"query","required":false,"description":"Filter scheduleNumber (lte)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][in]","in":"query","required":false,"description":"Filter scheduleNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduleNumber][notIn]","in":"query","required":false,"description":"Filter scheduleNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduleNumber][between]","in":"query","required":false,"description":"Filter scheduleNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[scheduleNumber][like]","in":"query","required":false,"description":"Filter scheduleNumber (like)","schema":{"type":"string"}},{"name":"filter[fixedAssetId]","in":"query","required":false,"description":"Filter fixedAssetId (equality)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][ne]","in":"query","required":false,"description":"Filter fixedAssetId (ne)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][gt]","in":"query","required":false,"description":"Filter fixedAssetId (gt)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][gte]","in":"query","required":false,"description":"Filter fixedAssetId (gte)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][lt]","in":"query","required":false,"description":"Filter fixedAssetId (lt)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][lte]","in":"query","required":false,"description":"Filter fixedAssetId (lte)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][in]","in":"query","required":false,"description":"Filter fixedAssetId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetId][notIn]","in":"query","required":false,"description":"Filter fixedAssetId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetId][between]","in":"query","required":false,"description":"Filter fixedAssetId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"number"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"number"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"number"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"number"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"number"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"number"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"number"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"number"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"number"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"number"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"number"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"number"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationRuleId]","in":"query","required":false,"description":"Filter depreciationRuleId (equality)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][ne]","in":"query","required":false,"description":"Filter depreciationRuleId (ne)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][gt]","in":"query","required":false,"description":"Filter depreciationRuleId (gt)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][gte]","in":"query","required":false,"description":"Filter depreciationRuleId (gte)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][lt]","in":"query","required":false,"description":"Filter depreciationRuleId (lt)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][lte]","in":"query","required":false,"description":"Filter depreciationRuleId (lte)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][in]","in":"query","required":false,"description":"Filter depreciationRuleId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationRuleId][notIn]","in":"query","required":false,"description":"Filter depreciationRuleId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationRuleId][between]","in":"query","required":false,"description":"Filter depreciationRuleId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[acquisitionDate]","in":"query","required":false,"description":"Filter acquisitionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][ne]","in":"query","required":false,"description":"Filter acquisitionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][gt]","in":"query","required":false,"description":"Filter acquisitionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][gte]","in":"query","required":false,"description":"Filter acquisitionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][lt]","in":"query","required":false,"description":"Filter acquisitionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][lte]","in":"query","required":false,"description":"Filter acquisitionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][in]","in":"query","required":false,"description":"Filter acquisitionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[acquisitionDate][notIn]","in":"query","required":false,"description":"Filter acquisitionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[acquisitionDate][between]","in":"query","required":false,"description":"Filter acquisitionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","scheduleNumber","-scheduleNumber","fixedAssetId","-fixedAssetId","status","-status","acquisitionDate","-acquisitionDate","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","scheduleNumber","fixedAssetId","entityId","bookId","depreciationRuleId","status","acquisitionDate","startDate","endDate","currency","acquisitionValue","depreciableAmount","depreciatedAmount","remainingValue","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/depreciationSchedulesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List depreciation schedules","description":"Lists depreciation schedules. Each schedule has the same fields as `GET fixed-assets/depreciation-schedules/:id`.\n\nRecording depreciation doesn't always update `lastModifiedDate`. It changes `depreciatedAmount` and `remainingValue`. It updates `lastModifiedDate` only when the schedule's `status` changes.","tags":["invDepreciationSchedules"]}},"/depreciation-policies/search":{"post":{"operationId":"searchDepreciationPolicies","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchDepreciationPoliciesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byName":{"value":{"data":{"items":[{"id":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5","depreciationPolicyNumber":"DP-0007","name":"Office Equipment — 5 Year Straight Line","description":"Standard straight-line write-down for office equipment over five years.","depreciationMethod":"StraightLine","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"3a5f81c6-9d24-4b70-8e15-6c2b7f094d38","accumulatedDepreciationAccountId":"9e14d7b2-6c83-4f51-a027-8d3b5e199c61","depreciationExpenseAccountId":"5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-14T09:12:33.000Z"}],"pagination":{"hasMore":false}}},"summary":"Policies in book 1 whose name mentions equipment"}}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchDepreciationPoliciesInput"},"examples":{"byName":{"value":{"filters":{"nameContains":"equipment","bookIds":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]}},"summary":"Policies in book 1 whose name mentions equipment"}}}}},"summary":"Search depreciation policies","description":"Searches depreciation policies. Each policy returned has the same fields as `GET depreciation-policies/:id`.\n\nTo filter by depreciation method, depreciation interval, account, active status, or `lastModifiedDate`, use `GET depreciation-policies`.","tags":["invDepreciationPolicies"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/depreciation-policies/{id}":{"get":{"operationId":"getDepreciationPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDepreciationPolicyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5","depreciationPolicyNumber":"DP-0007","name":"Office Equipment — 5 Year Straight Line","description":"Standard straight-line write-down for office equipment over five years.","depreciationMethod":"StraightLine","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"3a5f81c6-9d24-4b70-8e15-6c2b7f094d38","accumulatedDepreciationAccountId":"9e14d7b2-6c83-4f51-a027-8d3b5e199c61","depreciationExpenseAccountId":"5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-14T09:12:33.000Z"}},"summary":"A straight-line policy for office equipment"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the depreciation policy you want to retrieve.","examples":{"basic":{"value":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5"}}}],"summary":"Retrieve a depreciation policy","description":"Retrieves a depreciation policy. To find a policy by its number or name, use `POST depreciation-policies/search`.","tags":["invDepreciationPolicies"]}},"/depreciation-policies":{"get":{"operationId":"depreciationPolicies","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (equality)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][ne]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (ne)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][gt]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (gt)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][gte]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (gte)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][lt]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (lt)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][lte]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (lte)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][in]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationPolicyNumber][notIn]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationPolicyNumber][between]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationPolicyNumber][like]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (like)","schema":{"type":"string"}},{"name":"filter[depreciationMethod]","in":"query","required":false,"description":"Filter depreciationMethod (equality)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][ne]","in":"query","required":false,"description":"Filter depreciationMethod (ne)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][gt]","in":"query","required":false,"description":"Filter depreciationMethod (gt)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][gte]","in":"query","required":false,"description":"Filter depreciationMethod (gte)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][lt]","in":"query","required":false,"description":"Filter depreciationMethod (lt)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][lte]","in":"query","required":false,"description":"Filter depreciationMethod (lte)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][in]","in":"query","required":false,"description":"Filter depreciationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationMethod][notIn]","in":"query","required":false,"description":"Filter depreciationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationMethod][between]","in":"query","required":false,"description":"Filter depreciationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationMethod][like]","in":"query","required":false,"description":"Filter depreciationMethod (like)","schema":{"type":"string"}},{"name":"filter[depreciationConvention]","in":"query","required":false,"description":"Filter depreciationConvention (equality)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][ne]","in":"query","required":false,"description":"Filter depreciationConvention (ne)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][gt]","in":"query","required":false,"description":"Filter depreciationConvention (gt)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][gte]","in":"query","required":false,"description":"Filter depreciationConvention (gte)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][lt]","in":"query","required":false,"description":"Filter depreciationConvention (lt)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][lte]","in":"query","required":false,"description":"Filter depreciationConvention (lte)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][in]","in":"query","required":false,"description":"Filter depreciationConvention (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationConvention][notIn]","in":"query","required":false,"description":"Filter depreciationConvention (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationConvention][between]","in":"query","required":false,"description":"Filter depreciationConvention (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationConvention][like]","in":"query","required":false,"description":"Filter depreciationConvention (like)","schema":{"type":"string"}},{"name":"filter[depreciationInterval]","in":"query","required":false,"description":"Filter depreciationInterval (equality)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][ne]","in":"query","required":false,"description":"Filter depreciationInterval (ne)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][gt]","in":"query","required":false,"description":"Filter depreciationInterval (gt)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][gte]","in":"query","required":false,"description":"Filter depreciationInterval (gte)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][lt]","in":"query","required":false,"description":"Filter depreciationInterval (lt)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][lte]","in":"query","required":false,"description":"Filter depreciationInterval (lte)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][in]","in":"query","required":false,"description":"Filter depreciationInterval (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationInterval][notIn]","in":"query","required":false,"description":"Filter depreciationInterval (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationInterval][between]","in":"query","required":false,"description":"Filter depreciationInterval (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationInterval][like]","in":"query","required":false,"description":"Filter depreciationInterval (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[assetAccountId]","in":"query","required":false,"description":"Filter assetAccountId (equality)","schema":{"type":"string"}},{"name":"filter[assetAccountId][ne]","in":"query","required":false,"description":"Filter assetAccountId (ne)","schema":{"type":"string"}},{"name":"filter[assetAccountId][gt]","in":"query","required":false,"description":"Filter assetAccountId (gt)","schema":{"type":"string"}},{"name":"filter[assetAccountId][gte]","in":"query","required":false,"description":"Filter assetAccountId (gte)","schema":{"type":"string"}},{"name":"filter[assetAccountId][lt]","in":"query","required":false,"description":"Filter assetAccountId (lt)","schema":{"type":"string"}},{"name":"filter[assetAccountId][lte]","in":"query","required":false,"description":"Filter assetAccountId (lte)","schema":{"type":"string"}},{"name":"filter[assetAccountId][in]","in":"query","required":false,"description":"Filter assetAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[assetAccountId][notIn]","in":"query","required":false,"description":"Filter assetAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[assetAccountId][between]","in":"query","required":false,"description":"Filter assetAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[assetAccountId][like]","in":"query","required":false,"description":"Filter assetAccountId (like)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (equality)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][ne]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (ne)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][gt]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (gt)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][gte]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (gte)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][lt]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (lt)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][lte]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (lte)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][in]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accumulatedDepreciationAccountId][notIn]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accumulatedDepreciationAccountId][between]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accumulatedDepreciationAccountId][like]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (like)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (equality)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][ne]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (ne)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][gt]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (gt)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][gte]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (gte)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][lt]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (lt)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][lte]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (lte)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][in]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationExpenseAccountId][notIn]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationExpenseAccountId][between]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationExpenseAccountId][like]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (like)","schema":{"type":"string"}},{"name":"filter[gainAccountId]","in":"query","required":false,"description":"Filter gainAccountId (equality)","schema":{"type":"string"}},{"name":"filter[gainAccountId][ne]","in":"query","required":false,"description":"Filter gainAccountId (ne)","schema":{"type":"string"}},{"name":"filter[gainAccountId][gt]","in":"query","required":false,"description":"Filter gainAccountId (gt)","schema":{"type":"string"}},{"name":"filter[gainAccountId][gte]","in":"query","required":false,"description":"Filter gainAccountId (gte)","schema":{"type":"string"}},{"name":"filter[gainAccountId][lt]","in":"query","required":false,"description":"Filter gainAccountId (lt)","schema":{"type":"string"}},{"name":"filter[gainAccountId][lte]","in":"query","required":false,"description":"Filter gainAccountId (lte)","schema":{"type":"string"}},{"name":"filter[gainAccountId][in]","in":"query","required":false,"description":"Filter gainAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[gainAccountId][notIn]","in":"query","required":false,"description":"Filter gainAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[gainAccountId][between]","in":"query","required":false,"description":"Filter gainAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[gainAccountId][like]","in":"query","required":false,"description":"Filter gainAccountId (like)","schema":{"type":"string"}},{"name":"filter[lossAccountId]","in":"query","required":false,"description":"Filter lossAccountId (equality)","schema":{"type":"string"}},{"name":"filter[lossAccountId][ne]","in":"query","required":false,"description":"Filter lossAccountId (ne)","schema":{"type":"string"}},{"name":"filter[lossAccountId][gt]","in":"query","required":false,"description":"Filter lossAccountId (gt)","schema":{"type":"string"}},{"name":"filter[lossAccountId][gte]","in":"query","required":false,"description":"Filter lossAccountId (gte)","schema":{"type":"string"}},{"name":"filter[lossAccountId][lt]","in":"query","required":false,"description":"Filter lossAccountId (lt)","schema":{"type":"string"}},{"name":"filter[lossAccountId][lte]","in":"query","required":false,"description":"Filter lossAccountId (lte)","schema":{"type":"string"}},{"name":"filter[lossAccountId][in]","in":"query","required":false,"description":"Filter lossAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lossAccountId][notIn]","in":"query","required":false,"description":"Filter lossAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lossAccountId][between]","in":"query","required":false,"description":"Filter lossAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lossAccountId][like]","in":"query","required":false,"description":"Filter lossAccountId (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","depreciationPolicyNumber","-depreciationPolicyNumber","name","-name","depreciationMethod","-depreciationMethod","depreciationConvention","-depreciationConvention","depreciationInterval","-depreciationInterval","bookId","-bookId","active","-active","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","depreciationPolicyNumber","name","description","depreciationMethod","depreciationConvention","depreciationInterval","bookId","assetAccountId","accumulatedDepreciationAccountId","depreciationExpenseAccountId","gainAccountId","lossAccountId","active","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/depreciationPoliciesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5","depreciationPolicyNumber":"DP-0007","name":"Office Equipment — 5 Year Straight Line","description":"Standard straight-line write-down for office equipment over five years.","depreciationMethod":"StraightLine","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"3a5f81c6-9d24-4b70-8e15-6c2b7f094d38","accumulatedDepreciationAccountId":"9e14d7b2-6c83-4f51-a027-8d3b5e199c61","depreciationExpenseAccountId":"5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-14T09:12:33.000Z"},{"id":"7e2a9c05-4b18-4d73-91af-6c0e5b28d3f1","depreciationPolicyNumber":"DP-0008","name":"Vehicles — Declining Balance","description":"Declining-balance write-down for the vehicle fleet.","depreciationMethod":"Degressive","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"6b8d40f3-2c71-4e59-83a6-9f1e5d7b0a28","accumulatedDepreciationAccountId":"4e91c7a8-5d06-42b3-b7f4-8a3c1e6d905b","depreciationExpenseAccountId":"7a3f16d9-8e25-4c81-9b60-3d5f2a8c4e17","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-20T14:02:07.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List depreciation policies","description":"Lists depreciation policies. Each policy has the same fields as `GET depreciation-policies/:id`.\n\nTo find the policies that use an account, filter the list on that account field, such as `depreciationExpenseAccountId`. To find policies by name or description, use `POST depreciation-policies/search`.\n\nThe list includes policies that aren't set up for any legal entity.","tags":["invDepreciationPolicies"]}},"/fixed-assets/depreciation-schedules/{id}":{"get":{"operationId":"getDepreciationSchedule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDepreciationScheduleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39","scheduleNumber":"DS-0042","fixedAssetId":3187,"entityId":1,"bookId":1,"depreciationRuleId":12,"status":"Ongoing","acquisitionDate":"2024-01-15","startDate":"2024-02-01","endDate":"2029-01-31","currency":"EUR","acquisitionValue":"24000.00","depreciableAmount":"21600.00","depreciatedAmount":"7560.00","remainingValue":"16440.00","lastModifiedDate":"2026-08-14T09:12:33.000Z"}},"summary":"A schedule part-way through its run"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the depreciation schedule you want to retrieve.","examples":{"basic":{"value":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39"}}}],"summary":"Retrieve a depreciation schedule","description":"Retrieves a depreciation schedule. To find a schedule by its schedule number, use `POST fixed-assets/depreciation-schedules/search`.","tags":["invDepreciationSchedules"]}},"/fixed-assets/{id}":{"get":{"operationId":"getFixedAsset","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getFixedAssetOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"depreciating":{"value":{"data":{"id":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915","fixedAssetNumber":"FA-000142","fixedAssetStatus":"active","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","name":"Forklift - Warehouse 2","entityId":"c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9","assetStatus":"inUse","assetNumber":"CA-0881","serialNumber":"SN-77120934","assetTag":"WH2-FORK-03","acquisitionDate":"2024-03-11","departmentId":"5c8a2b70-1e94-4f37-8d06-b3e75f1290ac","typeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","typeName":"Machinery","bookId":"e0c37a94-2d15-4b86-9f42-5a7c81de03b6","currency":"EUR","inServiceDate":"2024-04-01","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationStatus":"Ongoing","acquisitionValueAmount":"42000","acquisitionValueCurrency":"EUR","salvageValueAmount":"2000","salvageValueCurrency":"EUR","depreciableAmount":"40000","depreciatedAmount":"13333.33","remainingValue":"28666.67","lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"An asset part-way through its life: depreciatedAmount against remainingValue"},"soldAndDisposed":{"value":{"data":{"id":"1f4c9a26-8d73-4b05-9e18-7a2c30f6b8d4","fixedAssetNumber":"FA-000097","fixedAssetStatus":"active","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","name":"Forklift - Warehouse 2","entityId":"c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9","assetStatus":"disposed","assetNumber":"CA-0881","serialNumber":"SN-77120934","assetTag":"WH2-FORK-03","acquisitionDate":"2024-03-11","departmentId":"5c8a2b70-1e94-4f37-8d06-b3e75f1290ac","typeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","typeName":"Machinery","bookId":"e0c37a94-2d15-4b86-9f42-5a7c81de03b6","currency":"EUR","inServiceDate":"2024-04-01","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationStatus":"Disposed","acquisitionValueAmount":"42000","acquisitionValueCurrency":"EUR","salvageValueAmount":"2000","salvageValueCurrency":"EUR","depreciableAmount":"40000","depreciatedAmount":"40000","remainingValue":"0","lastModifiedDate":"2026-08-18T09:14:22.517Z","disposalDate":"2026-06-30","disposalAmount":"0","disposalEntryId":"b8e14d57-3a09-4c62-8f75-2e91d06a4b3c","disposalEntryNumber":"JE-4412","soldAmountAmount":"3500","soldAmountCurrency":"EUR","saleEntryId":"6d20f83b-5c17-4e94-a1b8-9f0347e2c65d","saleEntryNumber":"JE-4413","revenueAccountId":"4a91c605-7e38-4d2b-b096-1c58e73f2a80"}},"summary":"A disposed asset that was sold - remainingValue is forced to 0, and the disposal and sale journal entries are named"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fixed asset you want to retrieve.","examples":{"depreciating":{"value":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915"},"soldAndDisposed":{"value":"1f4c9a26-8d73-4b05-9e18-7a2c30f6b8d4"}}}],"summary":"Retrieve a fixed asset","description":"Retrieves a fixed asset, including a voided one. `GET fixed-assets` does not return voided assets. A voided asset has a `fixedAssetStatus` of 'voided'.\n\nA `depreciationStatus` of 'Completed' can also mean the asset has no depreciation schedule. Check `depreciatedAmount` before you treat an asset as fully depreciated.\n\nAmounts are in the asset's own `currency` and are not converted. The exception is `soldAmountAmount`, which is in `soldAmountCurrency`.\n\nTo find a fixed asset by its fixed asset number, asset number, or serial number, use `POST fixed-assets/search`.","tags":["invFixedAssets"]}},"/fixed-asset-types":{"get":{"operationId":"fixedAssetTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[defaultUsefulLife]","in":"query","required":false,"description":"Filter defaultUsefulLife (equality)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][ne]","in":"query","required":false,"description":"Filter defaultUsefulLife (ne)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][gt]","in":"query","required":false,"description":"Filter defaultUsefulLife (gt)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][gte]","in":"query","required":false,"description":"Filter defaultUsefulLife (gte)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][lt]","in":"query","required":false,"description":"Filter defaultUsefulLife (lt)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][lte]","in":"query","required":false,"description":"Filter defaultUsefulLife (lte)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][in]","in":"query","required":false,"description":"Filter defaultUsefulLife (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultUsefulLife][notIn]","in":"query","required":false,"description":"Filter defaultUsefulLife (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultUsefulLife][between]","in":"query","required":false,"description":"Filter defaultUsefulLife (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[groupId]","in":"query","required":false,"description":"Filter groupId (equality)","schema":{"type":"string"}},{"name":"filter[groupId][ne]","in":"query","required":false,"description":"Filter groupId (ne)","schema":{"type":"string"}},{"name":"filter[groupId][gt]","in":"query","required":false,"description":"Filter groupId (gt)","schema":{"type":"string"}},{"name":"filter[groupId][gte]","in":"query","required":false,"description":"Filter groupId (gte)","schema":{"type":"string"}},{"name":"filter[groupId][lt]","in":"query","required":false,"description":"Filter groupId (lt)","schema":{"type":"string"}},{"name":"filter[groupId][lte]","in":"query","required":false,"description":"Filter groupId (lte)","schema":{"type":"string"}},{"name":"filter[groupId][in]","in":"query","required":false,"description":"Filter groupId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupId][notIn]","in":"query","required":false,"description":"Filter groupId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupId][between]","in":"query","required":false,"description":"Filter groupId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[groupId][like]","in":"query","required":false,"description":"Filter groupId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","defaultUsefulLife","-defaultUsefulLife","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","active","defaultUsefulLife","groupId","groupName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/fixedAssetTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"Fixed asset types — the master data a fixed asset is created from, carrying the depreciation defaults it inherits. Both active and inactive types are returned; filter active to populate a picker. [nav: @uicode:fixedAssetType?id={id}]","description":"The fixed asset type collection, with structured filtering, ordering, sparse field selection and cursor pagination in the query string.\n\n```\nGET fixed-asset-types?filter[active][eq]=true&filter[groupId][eq]=<id>&sort=name\n```\n\nA response is `{ \"data\": [ … ], \"pagination\": { \"hasMore\": …, \"nextCursor\": … } }`. Page forward by passing the previous `nextCursor` as `page[cursor]`. Page size defaults to 25 and is capped at 100; a larger `page[size]` is clamped to 100 rather than rejected.\n\n**`name` is filterable and orderable here, unlike on most resources.** An asset type name is a classification label chosen by whoever configures the module — 'Machinery', 'Vehicles' — not a person, a counterparty, or physical property, so it is not identifying data that has to stay out of a query string. The filter is exact match; there is no free-text search on this resource.\n\n**Inactive types are returned.** A type is deactivated rather than deleted once assets reference it, so the collection carries both and `active` is filterable: filter `active` when populating a picker, and leave it off when resolving the type a historical asset points at.\n\n**Incremental sync.** `lastModifiedDate` is both filterable and orderable, which is what makes `filter[lastModifiedDate][gte]=…&sort=lastModifiedDate` a complete sync cursor — either half alone is not. It tracks the FixedAssetType row only, so renaming the group a type belongs to does not move it.\n\n**`defaultUsefulLife` is a count of periods, not an amount.** No field on this resource is money, so nothing here carries a currency.","tags":["invFixedAssetTypes"]}},"/fixed-assets":{"get":{"operationId":"listFixedAssets","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber]","in":"query","required":false,"description":"Filter fixedAssetNumber (equality)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][ne]","in":"query","required":false,"description":"Filter fixedAssetNumber (ne)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][gt]","in":"query","required":false,"description":"Filter fixedAssetNumber (gt)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][gte]","in":"query","required":false,"description":"Filter fixedAssetNumber (gte)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][lt]","in":"query","required":false,"description":"Filter fixedAssetNumber (lt)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][lte]","in":"query","required":false,"description":"Filter fixedAssetNumber (lte)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][in]","in":"query","required":false,"description":"Filter fixedAssetNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetNumber][notIn]","in":"query","required":false,"description":"Filter fixedAssetNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetNumber][between]","in":"query","required":false,"description":"Filter fixedAssetNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fixedAssetNumber][like]","in":"query","required":false,"description":"Filter fixedAssetNumber (like)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus]","in":"query","required":false,"description":"Filter fixedAssetStatus (equality)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][ne]","in":"query","required":false,"description":"Filter fixedAssetStatus (ne)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][gt]","in":"query","required":false,"description":"Filter fixedAssetStatus (gt)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][gte]","in":"query","required":false,"description":"Filter fixedAssetStatus (gte)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][lt]","in":"query","required":false,"description":"Filter fixedAssetStatus (lt)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][lte]","in":"query","required":false,"description":"Filter fixedAssetStatus (lte)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][in]","in":"query","required":false,"description":"Filter fixedAssetStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetStatus][notIn]","in":"query","required":false,"description":"Filter fixedAssetStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetStatus][between]","in":"query","required":false,"description":"Filter fixedAssetStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fixedAssetStatus][like]","in":"query","required":false,"description":"Filter fixedAssetStatus (like)","schema":{"type":"string"}},{"name":"filter[companyAssetId]","in":"query","required":false,"description":"Filter companyAssetId (equality)","schema":{"type":"string"}},{"name":"filter[companyAssetId][ne]","in":"query","required":false,"description":"Filter companyAssetId (ne)","schema":{"type":"string"}},{"name":"filter[companyAssetId][gt]","in":"query","required":false,"description":"Filter companyAssetId (gt)","schema":{"type":"string"}},{"name":"filter[companyAssetId][gte]","in":"query","required":false,"description":"Filter companyAssetId (gte)","schema":{"type":"string"}},{"name":"filter[companyAssetId][lt]","in":"query","required":false,"description":"Filter companyAssetId (lt)","schema":{"type":"string"}},{"name":"filter[companyAssetId][lte]","in":"query","required":false,"description":"Filter companyAssetId (lte)","schema":{"type":"string"}},{"name":"filter[companyAssetId][in]","in":"query","required":false,"description":"Filter companyAssetId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[companyAssetId][notIn]","in":"query","required":false,"description":"Filter companyAssetId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[companyAssetId][between]","in":"query","required":false,"description":"Filter companyAssetId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[companyAssetId][like]","in":"query","required":false,"description":"Filter companyAssetId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[assetStatus]","in":"query","required":false,"description":"Filter assetStatus (equality)","schema":{"type":"string"}},{"name":"filter[assetStatus][ne]","in":"query","required":false,"description":"Filter assetStatus (ne)","schema":{"type":"string"}},{"name":"filter[assetStatus][gt]","in":"query","required":false,"description":"Filter assetStatus (gt)","schema":{"type":"string"}},{"name":"filter[assetStatus][gte]","in":"query","required":false,"description":"Filter assetStatus (gte)","schema":{"type":"string"}},{"name":"filter[assetStatus][lt]","in":"query","required":false,"description":"Filter assetStatus (lt)","schema":{"type":"string"}},{"name":"filter[assetStatus][lte]","in":"query","required":false,"description":"Filter assetStatus (lte)","schema":{"type":"string"}},{"name":"filter[assetStatus][in]","in":"query","required":false,"description":"Filter assetStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[assetStatus][notIn]","in":"query","required":false,"description":"Filter assetStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[assetStatus][between]","in":"query","required":false,"description":"Filter assetStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[assetStatus][like]","in":"query","required":false,"description":"Filter assetStatus (like)","schema":{"type":"string"}},{"name":"filter[acquisitionDate]","in":"query","required":false,"description":"Filter acquisitionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][ne]","in":"query","required":false,"description":"Filter acquisitionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][gt]","in":"query","required":false,"description":"Filter acquisitionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][gte]","in":"query","required":false,"description":"Filter acquisitionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][lt]","in":"query","required":false,"description":"Filter acquisitionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][lte]","in":"query","required":false,"description":"Filter acquisitionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][in]","in":"query","required":false,"description":"Filter acquisitionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[acquisitionDate][notIn]","in":"query","required":false,"description":"Filter acquisitionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[acquisitionDate][between]","in":"query","required":false,"description":"Filter acquisitionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId]","in":"query","required":false,"description":"Filter departmentId (equality)","schema":{"type":"string"}},{"name":"filter[departmentId][ne]","in":"query","required":false,"description":"Filter departmentId (ne)","schema":{"type":"string"}},{"name":"filter[departmentId][gt]","in":"query","required":false,"description":"Filter departmentId (gt)","schema":{"type":"string"}},{"name":"filter[departmentId][gte]","in":"query","required":false,"description":"Filter departmentId (gte)","schema":{"type":"string"}},{"name":"filter[departmentId][lt]","in":"query","required":false,"description":"Filter departmentId (lt)","schema":{"type":"string"}},{"name":"filter[departmentId][lte]","in":"query","required":false,"description":"Filter departmentId (lte)","schema":{"type":"string"}},{"name":"filter[departmentId][in]","in":"query","required":false,"description":"Filter departmentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][notIn]","in":"query","required":false,"description":"Filter departmentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][between]","in":"query","required":false,"description":"Filter departmentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId][like]","in":"query","required":false,"description":"Filter departmentId (like)","schema":{"type":"string"}},{"name":"filter[businessUnitId]","in":"query","required":false,"description":"Filter businessUnitId (equality)","schema":{"type":"string"}},{"name":"filter[businessUnitId][ne]","in":"query","required":false,"description":"Filter businessUnitId (ne)","schema":{"type":"string"}},{"name":"filter[businessUnitId][gt]","in":"query","required":false,"description":"Filter businessUnitId (gt)","schema":{"type":"string"}},{"name":"filter[businessUnitId][gte]","in":"query","required":false,"description":"Filter businessUnitId (gte)","schema":{"type":"string"}},{"name":"filter[businessUnitId][lt]","in":"query","required":false,"description":"Filter businessUnitId (lt)","schema":{"type":"string"}},{"name":"filter[businessUnitId][lte]","in":"query","required":false,"description":"Filter businessUnitId (lte)","schema":{"type":"string"}},{"name":"filter[businessUnitId][in]","in":"query","required":false,"description":"Filter businessUnitId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[businessUnitId][notIn]","in":"query","required":false,"description":"Filter businessUnitId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[businessUnitId][between]","in":"query","required":false,"description":"Filter businessUnitId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[businessUnitId][like]","in":"query","required":false,"description":"Filter businessUnitId (like)","schema":{"type":"string"}},{"name":"filter[typeId]","in":"query","required":false,"description":"Filter typeId (equality)","schema":{"type":"string"}},{"name":"filter[typeId][ne]","in":"query","required":false,"description":"Filter typeId (ne)","schema":{"type":"string"}},{"name":"filter[typeId][gt]","in":"query","required":false,"description":"Filter typeId (gt)","schema":{"type":"string"}},{"name":"filter[typeId][gte]","in":"query","required":false,"description":"Filter typeId (gte)","schema":{"type":"string"}},{"name":"filter[typeId][lt]","in":"query","required":false,"description":"Filter typeId (lt)","schema":{"type":"string"}},{"name":"filter[typeId][lte]","in":"query","required":false,"description":"Filter typeId (lte)","schema":{"type":"string"}},{"name":"filter[typeId][in]","in":"query","required":false,"description":"Filter typeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[typeId][notIn]","in":"query","required":false,"description":"Filter typeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[typeId][between]","in":"query","required":false,"description":"Filter typeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[typeId][like]","in":"query","required":false,"description":"Filter typeId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[inServiceDate]","in":"query","required":false,"description":"Filter inServiceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][ne]","in":"query","required":false,"description":"Filter inServiceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][gt]","in":"query","required":false,"description":"Filter inServiceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][gte]","in":"query","required":false,"description":"Filter inServiceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][lt]","in":"query","required":false,"description":"Filter inServiceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][lte]","in":"query","required":false,"description":"Filter inServiceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][in]","in":"query","required":false,"description":"Filter inServiceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[inServiceDate][notIn]","in":"query","required":false,"description":"Filter inServiceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[inServiceDate][between]","in":"query","required":false,"description":"Filter inServiceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationMethod]","in":"query","required":false,"description":"Filter depreciationMethod (equality)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][ne]","in":"query","required":false,"description":"Filter depreciationMethod (ne)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][gt]","in":"query","required":false,"description":"Filter depreciationMethod (gt)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][gte]","in":"query","required":false,"description":"Filter depreciationMethod (gte)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][lt]","in":"query","required":false,"description":"Filter depreciationMethod (lt)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][lte]","in":"query","required":false,"description":"Filter depreciationMethod (lte)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][in]","in":"query","required":false,"description":"Filter depreciationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationMethod][notIn]","in":"query","required":false,"description":"Filter depreciationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationMethod][between]","in":"query","required":false,"description":"Filter depreciationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationMethod][like]","in":"query","required":false,"description":"Filter depreciationMethod (like)","schema":{"type":"string"}},{"name":"filter[depreciationInterval]","in":"query","required":false,"description":"Filter depreciationInterval (equality)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][ne]","in":"query","required":false,"description":"Filter depreciationInterval (ne)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][gt]","in":"query","required":false,"description":"Filter depreciationInterval (gt)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][gte]","in":"query","required":false,"description":"Filter depreciationInterval (gte)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][lt]","in":"query","required":false,"description":"Filter depreciationInterval (lt)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][lte]","in":"query","required":false,"description":"Filter depreciationInterval (lte)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][in]","in":"query","required":false,"description":"Filter depreciationInterval (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationInterval][notIn]","in":"query","required":false,"description":"Filter depreciationInterval (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationInterval][between]","in":"query","required":false,"description":"Filter depreciationInterval (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationInterval][like]","in":"query","required":false,"description":"Filter depreciationInterval (like)","schema":{"type":"string"}},{"name":"filter[depreciationStatus]","in":"query","required":false,"description":"Filter depreciationStatus (equality)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][ne]","in":"query","required":false,"description":"Filter depreciationStatus (ne)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][gt]","in":"query","required":false,"description":"Filter depreciationStatus (gt)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][gte]","in":"query","required":false,"description":"Filter depreciationStatus (gte)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][lt]","in":"query","required":false,"description":"Filter depreciationStatus (lt)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][lte]","in":"query","required":false,"description":"Filter depreciationStatus (lte)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][in]","in":"query","required":false,"description":"Filter depreciationStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationStatus][notIn]","in":"query","required":false,"description":"Filter depreciationStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationStatus][between]","in":"query","required":false,"description":"Filter depreciationStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationStatus][like]","in":"query","required":false,"description":"Filter depreciationStatus (like)","schema":{"type":"string"}},{"name":"filter[disposalDate]","in":"query","required":false,"description":"Filter disposalDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][ne]","in":"query","required":false,"description":"Filter disposalDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][gt]","in":"query","required":false,"description":"Filter disposalDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][gte]","in":"query","required":false,"description":"Filter disposalDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][lt]","in":"query","required":false,"description":"Filter disposalDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][lte]","in":"query","required":false,"description":"Filter disposalDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][in]","in":"query","required":false,"description":"Filter disposalDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[disposalDate][notIn]","in":"query","required":false,"description":"Filter disposalDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[disposalDate][between]","in":"query","required":false,"description":"Filter disposalDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","fixedAssetNumber","-fixedAssetNumber","inServiceDate","-inServiceDate","acquisitionDate","-acquisitionDate","acquisitionValueAmount","-acquisitionValueAmount","remainingValue","-remainingValue","depreciatedAmount","-depreciatedAmount","disposalDate","-disposalDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","fixedAssetNumber","fixedAssetStatus","companyAssetId","name","entityId","assetStatus","assetNumber","serialNumber","assetTag","acquisitionDate","departmentId","businessUnitId","typeId","typeName","bookId","currency","inServiceDate","depreciationMethod","depreciationInterval","depreciationStatus","degressionRate","acquisitionValueAmount","acquisitionValueCurrency","salvageValueAmount","salvageValueCurrency","depreciationStartValueAmount","depreciableAmount","depreciatedAmount","initialDepreciatedAmount","remainingValue","disposalDate","disposalAmount","disposalEntryId","disposalEntryNumber","soldAmountAmount","soldAmountCurrency","saleEntryId","saleEntryNumber","saleReceivingAccountId","revenueAccountId","saleDocumentId","saleDocumentNumber","vatPercentageId","valueAllocationId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/listFixedAssetsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List fixed assets","description":"Lists fixed assets.\n\nVoided assets are not included, even if you filter `fixedAssetStatus` on 'voided'.\n\nAmounts are in each asset's own `currency` and are not converted. The exception is `soldAmountAmount`, which is in `soldAmountCurrency`. An asset recorded in more than one book has one fixed asset in each. Filter `bookId` before you add up amounts.\n\nA page has 25 fixed assets by default and at most 100. A larger `page[size]` is treated as 100.\n\nTo include voided assets, use `POST fixed-assets/search`. To read a voided asset by its id, use `GET fixed-assets/:id`. To filter by `name`, `assetTag`, `assetNumber`, or `serialNumber`, use `POST fixed-assets/search`.","tags":["invFixedAssets"]}},"/fixed-asset-types/{id}":{"get":{"operationId":"getFixedAssetType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getFixedAssetTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"grouped":{"value":{"data":{"id":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","name":"Machinery","active":true,"defaultUsefulLife":60,"groupId":"2e8c14a9-6b73-4f52-9d01-8a3f7e0c5b26","groupName":"Plant and Equipment","lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"An active type inside a group, carrying the default useful life a new asset inherits"},"ungroupedAndInactive":{"value":{"data":{"id":"c93a5f18-2d47-4b60-8e91-5f2c60a8d374","name":"Low-Value Assets","active":false,"lastModifiedDate":"2026-02-04T16:41:08.220Z"}},"summary":"A deactivated type with no group and no default useful life - groupId, groupName and defaultUsefulLife are all absent"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the fixed asset type; bound from the :id path segment. A value that is not UUID-shaped cannot match any record and is answered with NOT_FOUND, the same as a well-formed id that matches nothing.","examples":{"grouped":{"value":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"},"ungroupedAndInactive":{"value":"c93a5f18-2d47-4b60-8e91-5f2c60a8d374"}}}],"summary":"Fetch a fixed asset type by id, with its default useful life and the group it belongs to","description":"Reads one fixed asset type by its id, returning the whole record: the display name, whether it is still usable, the default useful life a new asset inherits, and the group it belongs to.\n\n**Look-ups by any other key are filters, not routes.** The type name identifies a type just as well for a human, and it is not this path parameter — which is the platform UUID. Filter `name` on `GET fixed-asset-types` instead; it returns this same item schema.\n\n**An inactive type IS returned here.** A type is deactivated rather than deleted once assets reference it, and an integration resolving the type a historical asset points at still needs to read it. Check `active`.\n\n**`defaultUsefulLife` is a count of periods, not a duration.** The depreciation interval that gives it units lives on the asset that inherited it, so the number alone does not say whether it means months or years.\n\nA missing id answers `NOT_FOUND` rather than an empty payload — under HTTP 400, so branch on the `code`.","tags":["invFixedAssetTypes"]}},"/fixed-assets/depreciation-schedules/search":{"post":{"operationId":"searchDepreciationSchedules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchDepreciationSchedulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"items":[{"id":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39","scheduleNumber":"DS-0042","fixedAssetId":3187,"entityId":1,"bookId":1,"depreciationRuleId":12,"status":"Ongoing","acquisitionDate":"2024-01-15","startDate":"2024-02-01","endDate":"2029-01-31","currency":"EUR","acquisitionValue":"24000.00","depreciableAmount":"21600.00","depreciatedAmount":"7560.00","remainingValue":"16440.00","lastModifiedDate":"2026-08-14T09:12:33.000Z"}],"pagination":{"hasMore":false}}},"summary":"Schedules that started during 2024 and are still running for one entity"}}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchDepreciationSchedulesInput"},"examples":{"basic":{"value":{"filters":{"status":"Ongoing","entityIds":[1],"startDateFrom":"2024-01-01","startDateTo":"2024-12-31"}},"summary":"Schedules that started during 2024 and are still running for one entity"}}}}},"summary":"Search depreciation schedules","description":"Searches depreciation schedules. Each schedule returned has the same fields as `GET fixed-assets/depreciation-schedules/:id`.\n\nTo filter by depreciation rule, acquisition date, currency, or `lastModifiedDate`, use `GET fixed-assets/depreciation-schedules`.","tags":["invDepreciationSchedules"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/fixed-assets/depreciation-schedules/record":{"post":{"operationId":"recordDepreciation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/recordDepreciationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"asyncExecution":false,"lineCount":3}},"summary":"Three lines posted inline"},"queuedInBackground":{"value":{"data":{"asyncExecution":true,"lineCount":5}},"summary":"A large batch is queued; no journal entries exist yet"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_LINES, LINES_NOT_FOUND, INVALID_SCHEDULE_STATE, TASK_ALREADY_RUNNING","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requested":{"type":"number","description":"The number of line ids you sent."}},"additionalProperties":false,"required":["requested"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SCHEDULE_STATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requested":{"type":"number","description":"The number of line ids you sent."}},"additionalProperties":false,"required":["requested"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SCHEDULE_STATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requested":{"type":"number","description":"The number of line ids you sent."}},"additionalProperties":false,"required":["requested"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SCHEDULE_STATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recordDepreciationInput"},"examples":{"basic":{"value":{"lineIds":[101,102,103],"postingDate":"2026-09-30"},"summary":"Three lines posted inline"},"queuedInBackground":{"value":{"lineIds":[201,202,203,204,205],"postingDate":"2026-09-30"},"summary":"A large batch is queued; no journal entries exist yet"}}}}},"summary":"Record depreciation","description":"Records depreciation for the depreciation schedule lines you send. It creates one journal entry for each schedule. Each journal entry is dated `postingDate`. It debits the depreciation expense account and credits the accumulated depreciation account of the fixed asset's depreciation policy.\n\nThis endpoint records only the lines you send, whatever their dates. It does not find the lines that are due.\n\nIf you send 35 line ids or fewer, the response comes back after the recording is finished. Either all the lines are recorded, or none are, and the response explains why.\n\nIf you send more than 35 line ids, the response comes back straight away, with `asyncExecution` set to `true`, and the lines are recorded afterwards. The response cannot tell you about errors, such as a line that is already recorded or a closed accounting period. A very large recording is saved in parts. If it stops because of an error, the parts saved before the error stay recorded. To check how much was recorded, read `depreciatedAmount` on the schedules, or list journal entries with the type 'depreciation' on `GET accounting/journal-entries`.\n\nThe request fails with `TASK_ALREADY_RUNNING` while another depreciation recording is running for the same legal entity and book. This includes recordings started in Lensing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["invDepreciationSchedules"]}},"/fixed-assets/search":{"post":{"operationId":"searchFixedAssets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchFixedAssetsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"bySerialNumber":{"value":{"data":{"items":[{"id":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915","fixedAssetNumber":"FA-000142","serialNumber":"SN-77120934","fixedAssetStatus":"active","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Find the asset bearing a serial number - the look-up that cannot be a URL"},"neverDisposed":{"value":{"data":{"items":[{"id":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915","fixedAssetStatus":"active","depreciationStatus":"Ongoing","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","lastModifiedDate":"2026-08-30T07:22:48.913Z"}],"pagination":{"hasMore":true,"nextCursor":"MjU="}}},"summary":"Assets carrying no disposal date - not expressible as a date range"},"voidedOnly":{"value":{"data":{"items":[{"id":"2b7f4e19-6c85-4a30-9d72-8e1350ca4f6b","fixedAssetNumber":"FA-000031","fixedAssetStatus":"voided","remainingValue":"0","companyAssetId":"6e2b90d4-71a5-4c38-b0f9-4d7e21c85a36","lastModifiedDate":"2026-05-02T16:40:11.204Z"}],"pagination":{"hasMore":false}}},"summary":"Voided assets, which the collection route cannot show at all"}}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR, INVALID_TIMESTAMP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The filter with the invalid value. Possible values: 'filters.lastModifiedDate.start' or 'filters.lastModifiedDate.end'."},"value":{"type":"string","description":"The value you sent."}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The filter with the invalid value. Possible values: 'filters.lastModifiedDate.start' or 'filters.lastModifiedDate.end'."},"value":{"type":"string","description":"The value you sent."}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchFixedAssetsInput"},"examples":{"bySerialNumber":{"value":{"filters":{"serialNumber":"SN-77120934"}},"summary":"Find the asset bearing a serial number - the look-up that cannot be a URL"},"neverDisposed":{"value":{"filters":{"disposed":false,"fixedAssetStatuses":["active"]}},"summary":"Assets carrying no disposal date - not expressible as a date range"},"voidedOnly":{"value":{"filters":{"fixedAssetStatuses":["voided"]}},"summary":"Voided assets, which the collection route cannot show at all"}}}}},"summary":"Search fixed assets","description":"Searches fixed assets, returning the same fields as `GET fixed-assets/:id` and `GET fixed-assets`.\n\n`name`, `assetTag`, `assetNumber`, and `serialNumber` can be filtered only on this endpoint. `name` and `assetTag` match any part of the value, and the match is case-insensitive. `assetNumber` and `serialNumber` must match exactly.\n\nVoided assets are included. To leave them out, set `fixedAssetStatuses` to ['active'].\n\nTo find assets that were never disposed, set `disposed` to false. A `disposalDate` range can't find them, because an asset with no disposal date falls outside every range. If you send `disposed: false` together with a `disposalDate` range, no fixed assets are returned.\n\nThe `acquisitionValueAmount` range compares only the number, not the currency. Amounts are not converted, so a range of 1,000 to 5,000 matches an asset worth 2,000 USD and one worth 2,000 JPY. To match amounts in one currency only, also filter on `currencies`.","tags":["invFixedAssets"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/psa/team-members/bulk":{"post":{"operationId":"createTeamMembers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTeamMembersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_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":"INVALID_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"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_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already 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_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTeamMembersInput"}}}},"summary":"Add people or placeholders to a project team","description":"Adds people or placeholders to a PSA project's team. Each item names exactly one of employeeId or placeholderId, and can also name a projectPositionId. An item with a projectPositionId creates a position assignment. An item without one adds the person to the team but creates no position assignment.\n\nIf any item can't be added, none are. Adding people needs edit permission on the project.\n\nThe response lists the ids of the created position assignments in the order you sent them. An item that creates no position assignment adds no id, so you can't match ids to items by their place in the list.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-team-members"]}},"/psa/time-entries/approve":{"post":{"operationId":"approveTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_STATUS_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveTimeEntriesInput"}}}},"summary":"Approve time entries","description":"Approves submitted time entries. Each time entry's status changes from 'pending' to 'approved'. If any time entry isn't 'pending', the request fails with ENTRY_STATUS_INVALID and none are approved.\n\nThe request also fails if ids is empty.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/positions/{id}":{"get":{"operationId":"getPsaPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPsaPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position you want to retrieve.","example":"7c2e91a4-58fd-4b30-9e17-3a6d05fb824c"}],"summary":"Retrieve a position","description":"Retrieves a position. The psaProjectId and the other reference ids on a position are numeric ids, not UUIDs, so you can't use them to read the project or any other record they point to.","tags":["psa-positions"]}},"/psa/projects/bulk-delete":{"post":{"operationId":"deletePsaProjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePsaProjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deletePsaProjectsInput"}}}},"summary":"Archive or delete projects","description":"Archives or deletes projects. By default the projects are archived, and POST psa/projects/bulk-restore brings them back. Set irreversible to true to delete them instead, which can't be undone.\n\nDeleting a project also deletes its milestones, fixed fees, expense budgets, and files, and its time-tracking data, including positions, position assignments, activities, allocations, and time entries. Deleting or archiving a project makes its team inactive, and the team is kept. A permanent delete fails if any of the project's positions, position assignments, or activities has been invoiced or has billed time.\n\nIf any project can't be deleted, none are. The response is empty. DELETE psa/projects/:id archives a single project and can't delete it.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-projects"]}},"/psa/positions":{"get":{"operationId":"psaPositions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billable]","in":"query","required":false,"description":"Filter billable (equality)","schema":{"type":"boolean"}},{"name":"filter[billable][ne]","in":"query","required":false,"description":"Filter billable (ne)","schema":{"type":"boolean"}},{"name":"filter[billable][gt]","in":"query","required":false,"description":"Filter billable (gt)","schema":{"type":"boolean"}},{"name":"filter[billable][gte]","in":"query","required":false,"description":"Filter billable (gte)","schema":{"type":"boolean"}},{"name":"filter[billable][lt]","in":"query","required":false,"description":"Filter billable (lt)","schema":{"type":"boolean"}},{"name":"filter[billable][lte]","in":"query","required":false,"description":"Filter billable (lte)","schema":{"type":"boolean"}},{"name":"filter[billable][in]","in":"query","required":false,"description":"Filter billable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][notIn]","in":"query","required":false,"description":"Filter billable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][between]","in":"query","required":false,"description":"Filter billable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitOfMeasure]","in":"query","required":false,"description":"Filter unitOfMeasure (equality)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][ne]","in":"query","required":false,"description":"Filter unitOfMeasure (ne)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][gt]","in":"query","required":false,"description":"Filter unitOfMeasure (gt)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][gte]","in":"query","required":false,"description":"Filter unitOfMeasure (gte)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][lt]","in":"query","required":false,"description":"Filter unitOfMeasure (lt)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][lte]","in":"query","required":false,"description":"Filter unitOfMeasure (lte)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][in]","in":"query","required":false,"description":"Filter unitOfMeasure (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitOfMeasure][notIn]","in":"query","required":false,"description":"Filter unitOfMeasure (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitOfMeasure][between]","in":"query","required":false,"description":"Filter unitOfMeasure (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitOfMeasure][like]","in":"query","required":false,"description":"Filter unitOfMeasure (like)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (equality)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][ne]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (ne)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][gt]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (gt)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][gte]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (gte)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][lt]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (lt)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][lte]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (lte)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][in]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hourlyBillRateCurrency][notIn]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hourlyBillRateCurrency][between]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hourlyBillRateCurrency][like]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (like)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (equality)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][ne]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (ne)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][gt]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (gt)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][gte]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (gte)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][lt]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (lt)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][lte]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (lte)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][in]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hourlyCostRateCurrency][notIn]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hourlyCostRateCurrency][between]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hourlyCostRateCurrency][like]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (like)","schema":{"type":"string"}},{"name":"filter[invoiced]","in":"query","required":false,"description":"Filter invoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[invoiced][ne]","in":"query","required":false,"description":"Filter invoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gt]","in":"query","required":false,"description":"Filter invoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gte]","in":"query","required":false,"description":"Filter invoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lt]","in":"query","required":false,"description":"Filter invoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lte]","in":"query","required":false,"description":"Filter invoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][in]","in":"query","required":false,"description":"Filter invoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][notIn]","in":"query","required":false,"description":"Filter invoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][between]","in":"query","required":false,"description":"Filter invoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","psaProjectId","-psaProjectId","unitOfMeasure","-unitOfMeasure","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","psaProjectId","name","description","salesOrderProductLineId","salesOrderProductLineRateCardEntryId","productId","productLineId","productLineRateCardEntryId","billable","unitOfMeasure","hourlyBillRate","hourlyBillRateCurrency","hourlyCostRate","hourlyCostRateCurrency","hoursBudget","invoiced","hrPositionId","skillLevelId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/psaPositionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7c2e91a4-58fd-4b30-9e17-3a6d05fb824c","psaProjectId":32341,"name":"Senior Consultant","billable":true,"unitOfMeasure":"hour","hourlyBillRate":"185.00","hourlyBillRateCurrency":"USD","hoursBudget":"120.00","invoiced":false,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"b40f6d82-1c95-42ae-8d73-5e0a9b16fc37","psaProjectId":32341,"name":"Project Manager","billable":true,"unitOfMeasure":"day","hourlyBillRate":"210.00","hourlyBillRateCurrency":"USD","hoursBudget":"80.00","invoiced":false,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List positions","description":"Lists positions. The psaProjectId and the other reference ids on a position are numeric ids, not UUIDs, so you can't use them to read the project or any other record they point to.\n\nPositions can't be filtered by name or description, and there is no search endpoint for positions.","tags":["psa-positions"]}},"/psa/project-types/bulk":{"post":{"operationId":"bulkCreateProjectTypes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateProjectTypesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateProjectTypesInput"}}}},"summary":"Bulk create project types","description":"Creates multiple project types in one request. If any project type can't be created, none are. A name you send twice creates one project type, so the response can list fewer ids than you sent. The request fails with DUPLICATE_NAME only when a project type in your tenant already has the name.\n\nThe response contains only the new ids. Read a project type with GET psa/project-types/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-project-types"]}},"/psa/placeholders":{"get":{"operationId":"placeholders","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["name","-name","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","weeklyWorkingHours","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/placeholdersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13","name":"Unassigned Backend Engineer","weeklyWorkingHours":"40.00","lastModifiedDate":"2026-08-14T09:12:33.184Z"},{"id":"b7c40e29-1af6-42d8-8e55-6d3b9c018a74","name":"Unassigned Designer","lastModifiedDate":"2026-08-02T16:45:07.902Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List placeholders","description":"Lists placeholders. The list includes only active placeholders.","tags":["psa-placeholders"]},"post":{"operationId":"createPlaceholders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPlaceholdersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_REQUIRED, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPlaceholdersInput"}}}},"summary":"Create placeholders","description":"Creates one or more placeholders. If any placeholder can't be created, none are. The response lists the new placeholders' ids in the order you sent them.\n\nA new placeholder isn't assigned to any project position.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-placeholders"]}},"/psa/milestones/{id}":{"get":{"operationId":"getMilestone","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getMilestoneOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the milestone you want to retrieve.","example":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}],"summary":"Retrieve a milestone","description":"Retrieves a milestone. The psaProjectId, invoiceId, productId, and productLineId on a milestone are numeric ids, not UUIDs, so you can't use them to read the project, invoice, product, or product line they point to.","tags":["psa-milestones"]}},"/psa/time-entries/delete":{"post":{"operationId":"deleteTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_INVOICED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deleteTimeEntriesInput"}}}},"summary":"Delete time entries","description":"Deletes one or more time entries. Only the time entries you name are deleted. If any time entry can't be deleted, none are.\n\nA time entry with status 'submittedForInvoicing' or 'invoiced' can't be deleted, and the request fails with ENTRY_INVOICED. The request also fails with a generic error when a time entry belongs to a project whose team is not active.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/projects":{"get":{"operationId":"projects","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"showArchivedProjects","in":"query","required":false,"schema":{"type":"boolean"},"description":"When true, archived projects are included in the results. Set via ?showArchivedProjects=true, not a filter[] entry."},{"name":"showPlanningProjects","in":"query","required":false,"schema":{"type":"boolean"},"description":"When true, projects in Planning and PlanningDraft status are included in the results. Set via ?showPlanningProjects=true, not a filter[] entry."},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[invoiced]","in":"query","required":false,"description":"Filter invoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[invoiced][ne]","in":"query","required":false,"description":"Filter invoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gt]","in":"query","required":false,"description":"Filter invoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gte]","in":"query","required":false,"description":"Filter invoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lt]","in":"query","required":false,"description":"Filter invoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lte]","in":"query","required":false,"description":"Filter invoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][in]","in":"query","required":false,"description":"Filter invoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][notIn]","in":"query","required":false,"description":"Filter invoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][between]","in":"query","required":false,"description":"Filter invoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectTypeId]","in":"query","required":false,"description":"Filter projectTypeId (equality)","schema":{"type":"number"}},{"name":"filter[projectTypeId][ne]","in":"query","required":false,"description":"Filter projectTypeId (ne)","schema":{"type":"number"}},{"name":"filter[projectTypeId][gt]","in":"query","required":false,"description":"Filter projectTypeId (gt)","schema":{"type":"number"}},{"name":"filter[projectTypeId][gte]","in":"query","required":false,"description":"Filter projectTypeId (gte)","schema":{"type":"number"}},{"name":"filter[projectTypeId][lt]","in":"query","required":false,"description":"Filter projectTypeId (lt)","schema":{"type":"number"}},{"name":"filter[projectTypeId][lte]","in":"query","required":false,"description":"Filter projectTypeId (lte)","schema":{"type":"number"}},{"name":"filter[projectTypeId][in]","in":"query","required":false,"description":"Filter projectTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectTypeId][notIn]","in":"query","required":false,"description":"Filter projectTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectTypeId][between]","in":"query","required":false,"description":"Filter projectTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[quoteId]","in":"query","required":false,"description":"Filter quoteId (equality)","schema":{"type":"number"}},{"name":"filter[quoteId][ne]","in":"query","required":false,"description":"Filter quoteId (ne)","schema":{"type":"number"}},{"name":"filter[quoteId][gt]","in":"query","required":false,"description":"Filter quoteId (gt)","schema":{"type":"number"}},{"name":"filter[quoteId][gte]","in":"query","required":false,"description":"Filter quoteId (gte)","schema":{"type":"number"}},{"name":"filter[quoteId][lt]","in":"query","required":false,"description":"Filter quoteId (lt)","schema":{"type":"number"}},{"name":"filter[quoteId][lte]","in":"query","required":false,"description":"Filter quoteId (lte)","schema":{"type":"number"}},{"name":"filter[quoteId][in]","in":"query","required":false,"description":"Filter quoteId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[quoteId][notIn]","in":"query","required":false,"description":"Filter quoteId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[quoteId][between]","in":"query","required":false,"description":"Filter quoteId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[opportunityId]","in":"query","required":false,"description":"Filter opportunityId (equality)","schema":{"type":"number"}},{"name":"filter[opportunityId][ne]","in":"query","required":false,"description":"Filter opportunityId (ne)","schema":{"type":"number"}},{"name":"filter[opportunityId][gt]","in":"query","required":false,"description":"Filter opportunityId (gt)","schema":{"type":"number"}},{"name":"filter[opportunityId][gte]","in":"query","required":false,"description":"Filter opportunityId (gte)","schema":{"type":"number"}},{"name":"filter[opportunityId][lt]","in":"query","required":false,"description":"Filter opportunityId (lt)","schema":{"type":"number"}},{"name":"filter[opportunityId][lte]","in":"query","required":false,"description":"Filter opportunityId (lte)","schema":{"type":"number"}},{"name":"filter[opportunityId][in]","in":"query","required":false,"description":"Filter opportunityId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[opportunityId][notIn]","in":"query","required":false,"description":"Filter opportunityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[opportunityId][between]","in":"query","required":false,"description":"Filter opportunityId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","lastModifiedDate","-lastModifiedDate","category","-category","status","-status","currency","-currency","invoiced","-invoiced","startDate","-startDate","endDate","-endDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","lastModifiedDate","name","code","category","status","currency","invoiced","startDate","endDate","notes","enforceActivityDateRange","budgetAmount","budgetCurrency","departmentId","teamId","teamName","teamStartDate","teamEndDate","salesRepresentativeId","salesRepresentativeName","projectTypeId","projectTypeName","quoteId","quoteNumber","opportunityId","opportunityName","opportunityCurrency","salesArrangementId","salesArrangementCurrency","salesArrangementCustomerId","salesArrangementCustomerName","salesArrangementEntityId","salesArrangementEntityName","revenueRecordedTimeToDate","revenueAccomplishedMilestones","revenueFixedFeeToDate","revenueToDate","budgetRemaining"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/projectsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List projects","description":"Lists projects. Unless you are a super admin, the list includes only projects where you are a team member. Archived projects and projects whose status is 'Planning' or 'PlanningDraft' are left out unless you send showArchivedProjects=true or showPlanningProjects=true.\n\nThere is no endpoint to find a project by name or code, or to list the projects of one department or one sales arrangement. To find a project by name, list the projects and match the name in your own code.","tags":["psa-projects"]},"post":{"operationId":"createPsaProject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPsaProjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPsaProjectInput"}}}},"summary":"Create a project","description":"Creates a project. The request also creates the project's time-tracking project and its team. Each employee in teamLeadIds is also given the PSA manager permission role.\n\nThe response contains only the new project's id. Read the project with GET psa/projects/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-projects"]}},"/psa/activities":{"get":{"operationId":"activities","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[billable]","in":"query","required":false,"description":"Filter billable (equality)","schema":{"type":"boolean"}},{"name":"filter[billable][ne]","in":"query","required":false,"description":"Filter billable (ne)","schema":{"type":"boolean"}},{"name":"filter[billable][gt]","in":"query","required":false,"description":"Filter billable (gt)","schema":{"type":"boolean"}},{"name":"filter[billable][gte]","in":"query","required":false,"description":"Filter billable (gte)","schema":{"type":"boolean"}},{"name":"filter[billable][lt]","in":"query","required":false,"description":"Filter billable (lt)","schema":{"type":"boolean"}},{"name":"filter[billable][lte]","in":"query","required":false,"description":"Filter billable (lte)","schema":{"type":"boolean"}},{"name":"filter[billable][in]","in":"query","required":false,"description":"Filter billable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][notIn]","in":"query","required":false,"description":"Filter billable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][between]","in":"query","required":false,"description":"Filter billable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiced]","in":"query","required":false,"description":"Filter invoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[invoiced][ne]","in":"query","required":false,"description":"Filter invoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gt]","in":"query","required":false,"description":"Filter invoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gte]","in":"query","required":false,"description":"Filter invoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lt]","in":"query","required":false,"description":"Filter invoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lte]","in":"query","required":false,"description":"Filter invoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][in]","in":"query","required":false,"description":"Filter invoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][notIn]","in":"query","required":false,"description":"Filter invoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][between]","in":"query","required":false,"description":"Filter invoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billingType]","in":"query","required":false,"description":"Filter billingType (equality)","schema":{"type":"string"}},{"name":"filter[billingType][ne]","in":"query","required":false,"description":"Filter billingType (ne)","schema":{"type":"string"}},{"name":"filter[billingType][gt]","in":"query","required":false,"description":"Filter billingType (gt)","schema":{"type":"string"}},{"name":"filter[billingType][gte]","in":"query","required":false,"description":"Filter billingType (gte)","schema":{"type":"string"}},{"name":"filter[billingType][lt]","in":"query","required":false,"description":"Filter billingType (lt)","schema":{"type":"string"}},{"name":"filter[billingType][lte]","in":"query","required":false,"description":"Filter billingType (lte)","schema":{"type":"string"}},{"name":"filter[billingType][in]","in":"query","required":false,"description":"Filter billingType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billingType][notIn]","in":"query","required":false,"description":"Filter billingType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billingType][between]","in":"query","required":false,"description":"Filter billingType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billingType][like]","in":"query","required":false,"description":"Filter billingType (like)","schema":{"type":"string"}},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","startDate","-startDate","endDate","-endDate","hoursBudget","-hoursBudget","billingType","-billingType","category","-category","psaProjectId","-psaProjectId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","hoursBudget","billable","invoiced","startDate","endDate","billingType","category","milestoneId","fixedFeeId","activityStatusId","statusName","parentActivityId","psaProjectId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/activitiesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6","name":"Discovery workshop","hoursBudget":"40.00","billable":true,"invoiced":false,"startDate":"2026-09-01","endDate":"2026-09-02","billingType":"Hours","category":"ClientBillable","statusName":"In progress","psaProjectId":32341,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"7d2e5a19-4b60-4c8f-8e31-15af9c0b62d4","name":"Phase 1 delivery","hoursBudget":"120.00","billable":true,"invoiced":true,"startDate":"2026-09-15","endDate":"2026-11-30","billingType":"Milestone","category":"ClientBillable","statusName":"Done","psaProjectId":32341,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List activities","description":"Lists activities. Each activity appears once in the list. The list does not say who is assigned to each activity.\n\nYou can't filter activities by name or description, and there is no search endpoint for activities.","tags":["psa-activities"]}},"/psa/activities/{id}":{"get":{"operationId":"getActivity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getActivityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the activity you want to retrieve.","example":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"}],"summary":"Retrieve an activity","description":"Retrieves an activity. The response does not include who is assigned to the activity, and no endpoint returns activity assignments.","tags":["psa-activities"]}},"/psa/time-entries/submit":{"post":{"operationId":"submitTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/submitTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_STATUS_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitTimeEntriesInput"}}}},"summary":"Submit time entries","description":"Submits time entries for approval. Each time entry's status changes to 'pending', and its submissionDate is set to the current date in UTC. Time entries go from 'draft' to 'pending' to 'approved' to 'submittedForInvoicing' to 'invoiced', and a 'pending' time entry can be 'rejected' instead.\n\nYou can submit a time entry that is 'draft' or 'rejected'. If any time entry is 'pending', 'approved', 'submittedForInvoicing', or 'invoiced', the request fails with ENTRY_STATUS_INVALID and none are submitted. The request also fails if ids is empty, or with a generic error when a time entry's team is not active.\n\nTo change an approved time entry, correct it with PATCH psa/time-entries, which returns it to 'draft'.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/accounting/products":{"post":{"operationId":"createAccountingProduct","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAccountingProductOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, DUPLICATE_PRODUCT_CODE, UNKNOWN_ITEM_IDS, UNKNOWN_ENTITY_ID, UNKNOWN_PRICE_BOOK_IDS, UNKNOWN_BILLABLE_COMPONENT_IDS, UNKNOWN_TAX_ENTITY_IDS, UNSUPPORTED_LINE_TYPE, USAGE_PRICING_NOT_APPLICABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ENTITY_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ENTITY_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ENTITY_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAccountingProductInput"}}}},"summary":"Create a product","description":"Creates a product. The request can include the product's product lines, with their pricing and tax records. If the product or any of its product lines can't be created, nothing is created.\n\nIf another product already uses the productCode, the request fails with DUPLICATE_PRODUCT_CODE, which names the other product's id.\n\nThe response contains only the new product's id. Read the record with GET accounting/products/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accounting/products"]},"get":{"operationId":"products","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[productCode]","in":"query","required":false,"description":"Filter productCode (equality)","schema":{"type":"string"}},{"name":"filter[productCode][ne]","in":"query","required":false,"description":"Filter productCode (ne)","schema":{"type":"string"}},{"name":"filter[productCode][gt]","in":"query","required":false,"description":"Filter productCode (gt)","schema":{"type":"string"}},{"name":"filter[productCode][gte]","in":"query","required":false,"description":"Filter productCode (gte)","schema":{"type":"string"}},{"name":"filter[productCode][lt]","in":"query","required":false,"description":"Filter productCode (lt)","schema":{"type":"string"}},{"name":"filter[productCode][lte]","in":"query","required":false,"description":"Filter productCode (lte)","schema":{"type":"string"}},{"name":"filter[productCode][in]","in":"query","required":false,"description":"Filter productCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productCode][notIn]","in":"query","required":false,"description":"Filter productCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productCode][between]","in":"query","required":false,"description":"Filter productCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productCode][like]","in":"query","required":false,"description":"Filter productCode (like)","schema":{"type":"string"}},{"name":"filter[effectiveStartDate]","in":"query","required":false,"description":"Filter effectiveStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][ne]","in":"query","required":false,"description":"Filter effectiveStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][gt]","in":"query","required":false,"description":"Filter effectiveStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][gte]","in":"query","required":false,"description":"Filter effectiveStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][lt]","in":"query","required":false,"description":"Filter effectiveStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][lte]","in":"query","required":false,"description":"Filter effectiveStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][in]","in":"query","required":false,"description":"Filter effectiveStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveStartDate][notIn]","in":"query","required":false,"description":"Filter effectiveStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveStartDate][between]","in":"query","required":false,"description":"Filter effectiveStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[effectiveEndDate]","in":"query","required":false,"description":"Filter effectiveEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][ne]","in":"query","required":false,"description":"Filter effectiveEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][gt]","in":"query","required":false,"description":"Filter effectiveEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][gte]","in":"query","required":false,"description":"Filter effectiveEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][lt]","in":"query","required":false,"description":"Filter effectiveEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][lte]","in":"query","required":false,"description":"Filter effectiveEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][in]","in":"query","required":false,"description":"Filter effectiveEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveEndDate][notIn]","in":"query","required":false,"description":"Filter effectiveEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveEndDate][between]","in":"query","required":false,"description":"Filter effectiveEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productFamily]","in":"query","required":false,"description":"Filter productFamily (equality)","schema":{"type":"string"}},{"name":"filter[productFamily][ne]","in":"query","required":false,"description":"Filter productFamily (ne)","schema":{"type":"string"}},{"name":"filter[productFamily][gt]","in":"query","required":false,"description":"Filter productFamily (gt)","schema":{"type":"string"}},{"name":"filter[productFamily][gte]","in":"query","required":false,"description":"Filter productFamily (gte)","schema":{"type":"string"}},{"name":"filter[productFamily][lt]","in":"query","required":false,"description":"Filter productFamily (lt)","schema":{"type":"string"}},{"name":"filter[productFamily][lte]","in":"query","required":false,"description":"Filter productFamily (lte)","schema":{"type":"string"}},{"name":"filter[productFamily][in]","in":"query","required":false,"description":"Filter productFamily (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productFamily][notIn]","in":"query","required":false,"description":"Filter productFamily (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productFamily][between]","in":"query","required":false,"description":"Filter productFamily (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productFamily][like]","in":"query","required":false,"description":"Filter productFamily (like)","schema":{"type":"string"}},{"name":"filter[productType]","in":"query","required":false,"description":"Filter productType (equality)","schema":{"type":"string"}},{"name":"filter[productType][ne]","in":"query","required":false,"description":"Filter productType (ne)","schema":{"type":"string"}},{"name":"filter[productType][gt]","in":"query","required":false,"description":"Filter productType (gt)","schema":{"type":"string"}},{"name":"filter[productType][gte]","in":"query","required":false,"description":"Filter productType (gte)","schema":{"type":"string"}},{"name":"filter[productType][lt]","in":"query","required":false,"description":"Filter productType (lt)","schema":{"type":"string"}},{"name":"filter[productType][lte]","in":"query","required":false,"description":"Filter productType (lte)","schema":{"type":"string"}},{"name":"filter[productType][in]","in":"query","required":false,"description":"Filter productType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productType][notIn]","in":"query","required":false,"description":"Filter productType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productType][between]","in":"query","required":false,"description":"Filter productType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productType][like]","in":"query","required":false,"description":"Filter productType (like)","schema":{"type":"string"}},{"name":"filter[productStatus]","in":"query","required":false,"description":"Filter productStatus (equality)","schema":{"type":"string"}},{"name":"filter[productStatus][ne]","in":"query","required":false,"description":"Filter productStatus (ne)","schema":{"type":"string"}},{"name":"filter[productStatus][gt]","in":"query","required":false,"description":"Filter productStatus (gt)","schema":{"type":"string"}},{"name":"filter[productStatus][gte]","in":"query","required":false,"description":"Filter productStatus (gte)","schema":{"type":"string"}},{"name":"filter[productStatus][lt]","in":"query","required":false,"description":"Filter productStatus (lt)","schema":{"type":"string"}},{"name":"filter[productStatus][lte]","in":"query","required":false,"description":"Filter productStatus (lte)","schema":{"type":"string"}},{"name":"filter[productStatus][in]","in":"query","required":false,"description":"Filter productStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productStatus][notIn]","in":"query","required":false,"description":"Filter productStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productStatus][between]","in":"query","required":false,"description":"Filter productStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productStatus][like]","in":"query","required":false,"description":"Filter productStatus (like)","schema":{"type":"string"}},{"name":"filter[isInventory]","in":"query","required":false,"description":"Filter isInventory (equality)","schema":{"type":"boolean"}},{"name":"filter[isInventory][ne]","in":"query","required":false,"description":"Filter isInventory (ne)","schema":{"type":"boolean"}},{"name":"filter[isInventory][gt]","in":"query","required":false,"description":"Filter isInventory (gt)","schema":{"type":"boolean"}},{"name":"filter[isInventory][gte]","in":"query","required":false,"description":"Filter isInventory (gte)","schema":{"type":"boolean"}},{"name":"filter[isInventory][lt]","in":"query","required":false,"description":"Filter isInventory (lt)","schema":{"type":"boolean"}},{"name":"filter[isInventory][lte]","in":"query","required":false,"description":"Filter isInventory (lte)","schema":{"type":"boolean"}},{"name":"filter[isInventory][in]","in":"query","required":false,"description":"Filter isInventory (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isInventory][notIn]","in":"query","required":false,"description":"Filter isInventory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isInventory][between]","in":"query","required":false,"description":"Filter isInventory (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","productCode","-productCode","productName","-productName","productStatus","-productStatus","productFamily","-productFamily","productType","-productType","isInventory","-isInventory","effectiveStartDate","-effectiveStartDate","effectiveEndDate","-effectiveEndDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","productName","productCode","productNumber","description","internalDescription","crmProductId","effectiveStartDate","effectiveEndDate","productFamily","productType","productStatus","isInventory","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/productsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List products","description":"Lists products. Each item is the product without its itemIds and externalIdentifiers. To get both, use GET accounting/products/:id or POST accounting/products/search.\n\nTo match by free text or filter by CRM id, use POST accounting/products/search.","tags":["accounting/products"]}},"/banking/bank-entries/{id}":{"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, 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'."},"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":"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'."},"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":"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'."},"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":"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"]},"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"]}},"/banking/bank-accounts/search":{"post":{"operationId":"searchBankAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBankAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBankAccountInput"}}}},"summary":"Search bank accounts","description":"Searches bank accounts. Only this endpoint can match a bank account by a name or an account number. GET banking/bank-accounts returns names and account numbers but can't filter on them.\n\nBank accounts deleted with DELETE banking/bank-accounts/:id are never returned.","tags":["bankingBankAccounts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/tax-configurations/{id}":{"patch":{"operationId":"updateTaxConfiguration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateTaxConfigurationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NO_LINES, LINE_NOT_FOUND, DUPLICATE_LINE_TITLE, DUPLICATE_TAX_CODE, LINE_WITHOUT_ACCOUNTS, MISSING_REVERSE_CHARGE_ACCOUNT, CHART_OF_ACCOUNTS_NOT_FOUND, ACCOUNT_NOT_FOUND, REVERSE_CHARGE_ACCOUNT_NOT_FOUND, COLLECTED_ACCOUNT_NOT_FOUND, COMPONENT_WITHOUT_ACCOUNTS, COMPONENT_PERCENTAGE_MISMATCH, CASH_BASIS_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the tax configuration you want to update.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateTaxConfigurationInput"}}}},"summary":"Update a tax configuration","description":"Updates a tax configuration with the fields you send. A field you leave out keeps its current value.\n\nA lines list you send replaces the whole set of tax codes, so include every tax code you want to keep. A line with an id updates that tax code, and a line without one creates a tax code. An existing tax code that isn't in the list is deleted with its accounts.\n\nThe response is empty. Read the updated configuration with GET accounting/tax-configurations/:id.","tags":["accountingTaxConfigurations"]},"get":{"operationId":"getTaxConfiguration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTaxConfigurationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the tax configuration you want to retrieve."}],"summary":"Retrieve a tax configuration","description":"Retrieves a tax configuration.","tags":["accountingTaxConfigurations"]}},"/accounting/usages":{"get":{"operationId":"listUsage","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listUsageOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE_FILTER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records with this status. Accepted values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'. Omit for every status."},{"name":"unitOfMeasure","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records in this unit, for example 'Hour', 'GB' or 'Call'. Omit for every unit."},{"name":"usagePeriodId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records in the usage period with this identifier. An identifier matching no usage period returns an empty page."},{"name":"billableComponentId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records attributed to the billable component with this identifier. An identifier matching no billable component returns an empty page."},{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records whose date is on or after this bound. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ. A time zone is converted to UTC before matching."},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records whose date is on or before this bound. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ. A time zone is converted to UTC before matching."},{"name":"lastModifiedFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records changed on or after this time, in UTC. Use format YYYY-MM-DDTHH:mm:ss.sssZ."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit for the first page."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of usage records per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}],"summary":"List usage records","description":"Lists usage records. This collection does not follow the standard rules in Pagination and querying. Page with `pageSize` and `cursor`, not `page[size]` and `page[cursor]`. Filter with the query parameters listed below, such as `status`, not `filter[field][op]`.\n\nThe response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`. There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules gets the first page, unfiltered, every time.","tags":["accountingUsages"]}},"/accounting/fiscal-calendars":{"get":{"operationId":"fiscalCalendars","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[periodFormat]","in":"query","required":false,"description":"Filter periodFormat (equality)","schema":{"type":"string"}},{"name":"filter[periodFormat][ne]","in":"query","required":false,"description":"Filter periodFormat (ne)","schema":{"type":"string"}},{"name":"filter[periodFormat][gt]","in":"query","required":false,"description":"Filter periodFormat (gt)","schema":{"type":"string"}},{"name":"filter[periodFormat][gte]","in":"query","required":false,"description":"Filter periodFormat (gte)","schema":{"type":"string"}},{"name":"filter[periodFormat][lt]","in":"query","required":false,"description":"Filter periodFormat (lt)","schema":{"type":"string"}},{"name":"filter[periodFormat][lte]","in":"query","required":false,"description":"Filter periodFormat (lte)","schema":{"type":"string"}},{"name":"filter[periodFormat][in]","in":"query","required":false,"description":"Filter periodFormat (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodFormat][notIn]","in":"query","required":false,"description":"Filter periodFormat (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodFormat][between]","in":"query","required":false,"description":"Filter periodFormat (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[periodFormat][like]","in":"query","required":false,"description":"Filter periodFormat (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[fiscalYearsCount]","in":"query","required":false,"description":"Filter fiscalYearsCount (equality)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][ne]","in":"query","required":false,"description":"Filter fiscalYearsCount (ne)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][gt]","in":"query","required":false,"description":"Filter fiscalYearsCount (gt)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][gte]","in":"query","required":false,"description":"Filter fiscalYearsCount (gte)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][lt]","in":"query","required":false,"description":"Filter fiscalYearsCount (lt)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][lte]","in":"query","required":false,"description":"Filter fiscalYearsCount (lte)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][in]","in":"query","required":false,"description":"Filter fiscalYearsCount (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYearsCount][notIn]","in":"query","required":false,"description":"Filter fiscalYearsCount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYearsCount][between]","in":"query","required":false,"description":"Filter fiscalYearsCount (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[anchorDate]","in":"query","required":false,"description":"Filter anchorDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][ne]","in":"query","required":false,"description":"Filter anchorDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][gt]","in":"query","required":false,"description":"Filter anchorDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][gte]","in":"query","required":false,"description":"Filter anchorDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][lt]","in":"query","required":false,"description":"Filter anchorDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][lte]","in":"query","required":false,"description":"Filter anchorDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][in]","in":"query","required":false,"description":"Filter anchorDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[anchorDate][notIn]","in":"query","required":false,"description":"Filter anchorDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[anchorDate][between]","in":"query","required":false,"description":"Filter anchorDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","calendarName","-calendarName","periodFormat","-periodFormat","status","-status","fiscalYearsCount","-fiscalYearsCount","anchorDate","-anchorDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","calendarName","description","periodFormat","status","fiscalYearsCount","anchorDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/fiscalCalendarsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List fiscal calendars","description":"Lists fiscal calendars. To read a calendar's fiscal years and assigned legal entities, use GET accounting/fiscal-calendars/:id.","tags":["accountingFiscalCalendars"]}},"/accounting/revenue-scheduling-templates/{id}":{"get":{"operationId":"getRevenueSchedulingTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getRevenueSchedulingTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revenue scheduling template you want to retrieve."}],"summary":"Retrieve a revenue scheduling template","description":"Retrieves a revenue scheduling template. Use the revenue scheduling template's id, not its revenueSchedulingTemplateNumber.","tags":["accountingRevenueSchedulingTemplates"]}},"/accounting/credit-memos/{id}":{"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"]},"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"]}},"/accounting/pricing/search":{"post":{"operationId":"searchAccountingPricing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAccountingPricingOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE, INVALID_TIMESTAMP, UNKNOWN_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAccountingPricingInput"}}}},"summary":"Search pricing headers","description":"Searches pricing headers.","tags":["accounting/products/productLines"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/credit-memos/{id}/unapply":{"post":{"operationId":"unapplyCreditMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/unapplyCreditMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVOICE_NOT_FOUND, NO_APPLICATIONS, UNAPPLY_EXCEEDS_APPLIED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNAPPLY_EXCEEDS_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNAPPLY_EXCEEDS_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNAPPLY_EXCEEDS_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the credit memo you want to unapply."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/unapplyCreditMemoInput"}}}},"summary":"Unapply a credit memo from invoices","description":"Unapplies a credit memo from invoices. Each reversal is recorded as a negative allocation. The original allocation stays, so applications on GET accounting/credit-memos/:id lists both the allocation and its reversal.\n\nThe response is empty.","tags":["accountingCreditMemos"]}},"/accounting/accounting-periods":{"get":{"operationId":"accountingPeriods","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId]","in":"query","required":false,"description":"Filter accountingPeriodId (equality)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][ne]","in":"query","required":false,"description":"Filter accountingPeriodId (ne)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gt]","in":"query","required":false,"description":"Filter accountingPeriodId (gt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gte]","in":"query","required":false,"description":"Filter accountingPeriodId (gte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lt]","in":"query","required":false,"description":"Filter accountingPeriodId (lt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lte]","in":"query","required":false,"description":"Filter accountingPeriodId (lte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][in]","in":"query","required":false,"description":"Filter accountingPeriodId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][notIn]","in":"query","required":false,"description":"Filter accountingPeriodId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][between]","in":"query","required":false,"description":"Filter accountingPeriodId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountingPeriodId][like]","in":"query","required":false,"description":"Filter accountingPeriodId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId]","in":"query","required":false,"description":"Filter fiscalCalendarId (equality)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][ne]","in":"query","required":false,"description":"Filter fiscalCalendarId (ne)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][gt]","in":"query","required":false,"description":"Filter fiscalCalendarId (gt)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][gte]","in":"query","required":false,"description":"Filter fiscalCalendarId (gte)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][lt]","in":"query","required":false,"description":"Filter fiscalCalendarId (lt)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][lte]","in":"query","required":false,"description":"Filter fiscalCalendarId (lte)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][in]","in":"query","required":false,"description":"Filter fiscalCalendarId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalCalendarId][notIn]","in":"query","required":false,"description":"Filter fiscalCalendarId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalCalendarId][between]","in":"query","required":false,"description":"Filter fiscalCalendarId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalCalendarId][like]","in":"query","required":false,"description":"Filter fiscalCalendarId (like)","schema":{"type":"string"}},{"name":"filter[periodName]","in":"query","required":false,"description":"Filter periodName (equality)","schema":{"type":"string"}},{"name":"filter[periodName][ne]","in":"query","required":false,"description":"Filter periodName (ne)","schema":{"type":"string"}},{"name":"filter[periodName][gt]","in":"query","required":false,"description":"Filter periodName (gt)","schema":{"type":"string"}},{"name":"filter[periodName][gte]","in":"query","required":false,"description":"Filter periodName (gte)","schema":{"type":"string"}},{"name":"filter[periodName][lt]","in":"query","required":false,"description":"Filter periodName (lt)","schema":{"type":"string"}},{"name":"filter[periodName][lte]","in":"query","required":false,"description":"Filter periodName (lte)","schema":{"type":"string"}},{"name":"filter[periodName][in]","in":"query","required":false,"description":"Filter periodName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][notIn]","in":"query","required":false,"description":"Filter periodName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][between]","in":"query","required":false,"description":"Filter periodName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[periodName][like]","in":"query","required":false,"description":"Filter periodName (like)","schema":{"type":"string"}},{"name":"filter[fiscalYear]","in":"query","required":false,"description":"Filter fiscalYear (equality)","schema":{"type":"string"}},{"name":"filter[fiscalYear][ne]","in":"query","required":false,"description":"Filter fiscalYear (ne)","schema":{"type":"string"}},{"name":"filter[fiscalYear][gt]","in":"query","required":false,"description":"Filter fiscalYear (gt)","schema":{"type":"string"}},{"name":"filter[fiscalYear][gte]","in":"query","required":false,"description":"Filter fiscalYear (gte)","schema":{"type":"string"}},{"name":"filter[fiscalYear][lt]","in":"query","required":false,"description":"Filter fiscalYear (lt)","schema":{"type":"string"}},{"name":"filter[fiscalYear][lte]","in":"query","required":false,"description":"Filter fiscalYear (lte)","schema":{"type":"string"}},{"name":"filter[fiscalYear][in]","in":"query","required":false,"description":"Filter fiscalYear (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYear][notIn]","in":"query","required":false,"description":"Filter fiscalYear (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYear][between]","in":"query","required":false,"description":"Filter fiscalYear (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalYear][like]","in":"query","required":false,"description":"Filter fiscalYear (like)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter]","in":"query","required":false,"description":"Filter fiscalQuarter (equality)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][ne]","in":"query","required":false,"description":"Filter fiscalQuarter (ne)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][gt]","in":"query","required":false,"description":"Filter fiscalQuarter (gt)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][gte]","in":"query","required":false,"description":"Filter fiscalQuarter (gte)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][lt]","in":"query","required":false,"description":"Filter fiscalQuarter (lt)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][lte]","in":"query","required":false,"description":"Filter fiscalQuarter (lte)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][in]","in":"query","required":false,"description":"Filter fiscalQuarter (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalQuarter][notIn]","in":"query","required":false,"description":"Filter fiscalQuarter (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalQuarter][between]","in":"query","required":false,"description":"Filter fiscalQuarter (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalQuarter][like]","in":"query","required":false,"description":"Filter fiscalQuarter (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[reopenedByCascade]","in":"query","required":false,"description":"Filter reopenedByCascade (equality)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][ne]","in":"query","required":false,"description":"Filter reopenedByCascade (ne)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][gt]","in":"query","required":false,"description":"Filter reopenedByCascade (gt)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][gte]","in":"query","required":false,"description":"Filter reopenedByCascade (gte)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][lt]","in":"query","required":false,"description":"Filter reopenedByCascade (lt)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][lte]","in":"query","required":false,"description":"Filter reopenedByCascade (lte)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][in]","in":"query","required":false,"description":"Filter reopenedByCascade (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reopenedByCascade][notIn]","in":"query","required":false,"description":"Filter reopenedByCascade (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reopenedByCascade][between]","in":"query","required":false,"description":"Filter reopenedByCascade (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[durationDays]","in":"query","required":false,"description":"Filter durationDays (equality)","schema":{"type":"number"}},{"name":"filter[durationDays][ne]","in":"query","required":false,"description":"Filter durationDays (ne)","schema":{"type":"number"}},{"name":"filter[durationDays][gt]","in":"query","required":false,"description":"Filter durationDays (gt)","schema":{"type":"number"}},{"name":"filter[durationDays][gte]","in":"query","required":false,"description":"Filter durationDays (gte)","schema":{"type":"number"}},{"name":"filter[durationDays][lt]","in":"query","required":false,"description":"Filter durationDays (lt)","schema":{"type":"number"}},{"name":"filter[durationDays][lte]","in":"query","required":false,"description":"Filter durationDays (lte)","schema":{"type":"number"}},{"name":"filter[durationDays][in]","in":"query","required":false,"description":"Filter durationDays (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[durationDays][notIn]","in":"query","required":false,"description":"Filter durationDays (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[durationDays][between]","in":"query","required":false,"description":"Filter durationDays (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hasTransactions]","in":"query","required":false,"description":"Filter hasTransactions (equality)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][ne]","in":"query","required":false,"description":"Filter hasTransactions (ne)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][gt]","in":"query","required":false,"description":"Filter hasTransactions (gt)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][gte]","in":"query","required":false,"description":"Filter hasTransactions (gte)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][lt]","in":"query","required":false,"description":"Filter hasTransactions (lt)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][lte]","in":"query","required":false,"description":"Filter hasTransactions (lte)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][in]","in":"query","required":false,"description":"Filter hasTransactions (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasTransactions][notIn]","in":"query","required":false,"description":"Filter hasTransactions (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasTransactions][between]","in":"query","required":false,"description":"Filter hasTransactions (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[postable]","in":"query","required":false,"description":"Filter postable (equality)","schema":{"type":"boolean"}},{"name":"filter[postable][ne]","in":"query","required":false,"description":"Filter postable (ne)","schema":{"type":"boolean"}},{"name":"filter[postable][gt]","in":"query","required":false,"description":"Filter postable (gt)","schema":{"type":"boolean"}},{"name":"filter[postable][gte]","in":"query","required":false,"description":"Filter postable (gte)","schema":{"type":"boolean"}},{"name":"filter[postable][lt]","in":"query","required":false,"description":"Filter postable (lt)","schema":{"type":"boolean"}},{"name":"filter[postable][lte]","in":"query","required":false,"description":"Filter postable (lte)","schema":{"type":"boolean"}},{"name":"filter[postable][in]","in":"query","required":false,"description":"Filter postable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postable][notIn]","in":"query","required":false,"description":"Filter postable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postable][between]","in":"query","required":false,"description":"Filter postable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","periodName","-periodName","fiscalYear","-fiscalYear","fiscalQuarter","-fiscalQuarter","startDate","-startDate","endDate","-endDate","status","-status","durationDays","-durationDays","postable","-postable","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","accountingPeriodId","entityId","entityName","bookId","bookName","fiscalCalendarId","fiscalCalendarName","periodName","fiscalYear","fiscalQuarter","startDate","endDate","status","reopeningReason","reopenedByCascade","durationDays","hasTransactions","postable","postableReason","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/accountingPeriodsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List accounting periods","description":"Lists accounting periods. Each item is one period for one legal entity and one accounting book.\n\nTo read an item with its period-close checklist, use GET accounting/accounting-periods/:id.","tags":["accountingAccountingPeriods"]}},"/accounting/tax-configurations":{"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"]},"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"]}},"/banking/bank-entries":{"post":{"operationId":"createBankEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBankEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: 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, 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'."},"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":"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'."},"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":"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'."},"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":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBankEntryInput"}}}},"summary":"Create a bank entry","description":"Creates a bank entry with its lines. The bank entry creates a journal entry in the general ledger. The journal entry goes into the accounting period of transactionDate when that period is open in every full accounting book of the legal entity.\n\nIf the period is closed or locked in every book, the journal entry goes into the next period that is open in all of them, up to 11 periods later. If none of those periods is open in every book, or a period is open in some books and closed in others, the request fails with POSTING_PERIOD_NOT_OPEN.\n\nThe response contains only the new bank entry's id. Read the record with GET banking/bank-entries/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingBankEntries"]},"get":{"operationId":"bankEntries","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber]","in":"query","required":false,"description":"Filter bankEntryNumber (equality)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][ne]","in":"query","required":false,"description":"Filter bankEntryNumber (ne)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][gt]","in":"query","required":false,"description":"Filter bankEntryNumber (gt)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][gte]","in":"query","required":false,"description":"Filter bankEntryNumber (gte)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][lt]","in":"query","required":false,"description":"Filter bankEntryNumber (lt)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][lte]","in":"query","required":false,"description":"Filter bankEntryNumber (lte)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][in]","in":"query","required":false,"description":"Filter bankEntryNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bankEntryNumber][notIn]","in":"query","required":false,"description":"Filter bankEntryNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bankEntryNumber][between]","in":"query","required":false,"description":"Filter bankEntryNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bankEntryNumber][like]","in":"query","required":false,"description":"Filter bankEntryNumber (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceDate]","in":"query","required":false,"description":"Filter serviceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][ne]","in":"query","required":false,"description":"Filter serviceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gt]","in":"query","required":false,"description":"Filter serviceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gte]","in":"query","required":false,"description":"Filter serviceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lt]","in":"query","required":false,"description":"Filter serviceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lte]","in":"query","required":false,"description":"Filter serviceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][in]","in":"query","required":false,"description":"Filter serviceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][notIn]","in":"query","required":false,"description":"Filter serviceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][between]","in":"query","required":false,"description":"Filter serviceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber]","in":"query","required":false,"description":"Filter journalEntryNumber (equality)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][ne]","in":"query","required":false,"description":"Filter journalEntryNumber (ne)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][gt]","in":"query","required":false,"description":"Filter journalEntryNumber (gt)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][gte]","in":"query","required":false,"description":"Filter journalEntryNumber (gte)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][lt]","in":"query","required":false,"description":"Filter journalEntryNumber (lt)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][lte]","in":"query","required":false,"description":"Filter journalEntryNumber (lte)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][in]","in":"query","required":false,"description":"Filter journalEntryNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryNumber][notIn]","in":"query","required":false,"description":"Filter journalEntryNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryNumber][between]","in":"query","required":false,"description":"Filter journalEntryNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[journalEntryNumber][like]","in":"query","required":false,"description":"Filter journalEntryNumber (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","bankEntryNumber","-bankEntryNumber","transactionDate","-transactionDate","serviceDate","-serviceDate","currency","-currency","status","-status","journalEntryNumber","-journalEntryNumber","origin","-origin","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","bankEntryNumber","name","description","transactionDate","serviceDate","currency","status","journalEntryNumber","origin","bankAccountName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/bankEntriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List bank entries","description":"Lists bank entries. Each item is a bank entry without its lines.\n\nTo read the lines, use GET banking/bank-entries/:id. To match on the bank account, use POST banking/bank-entries/search.","tags":["bankingBankEntries"]}},"/accounting/debit-memos/{id}":{"patch":{"operationId":"updateDebitMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateDebitMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"changingThePaymentTerm":{"value":{"data":{}},"summary":"Recording a renegotiated payment term. The stored dueDate is deliberately left where it is, and the call returns no body."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. 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 debit memo you want to update.","examples":{"changingThePaymentTerm":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateDebitMemoInput"},"examples":{"changingThePaymentTerm":{"value":{"paymentTerm":"net60"},"summary":"Recording a renegotiated payment term. The stored dueDate is deliberately left where it is, and the call returns no body."}}}}},"summary":"Update a debit memo","description":"Updates a debit memo with the fields you send. A field you leave out keeps its current value.\n\nUse the debit memo's id, not its debitMemoNumber.\n\nYou can change only customerMessage, purchaseOrder, and paymentTerm. This endpoint can't change the dates, amounts, lines, general ledger account, or addresses of a debit memo.\n\nThe response is empty. Read the updated record with GET accounting/debit-memos/:id.","tags":["accountingDebitMemos"]},"get":{"operationId":"getDebitMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDebitMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the debit memo you want to retrieve."}],"summary":"Retrieve a debit memo","description":"Retrieves a debit memo. Use the debit memo's id, not its debitMemoNumber.","tags":["accountingDebitMemos"]}},"/accounting/debit-memos":{"post":{"operationId":"createDebitMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createDebitMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"approvedOnCreate":{"value":{"data":{"id":"8e70b13a-45f6-4d80-9c6d-2e8f70b13a45","debitMemoNumber":"DM-1043","creditMemoId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","debitMemoDate":"2026-01-15","dueDate":"2026-02-14","approvalStatus":"approved","debitMemoType":"writeOff","currency":"USD","isMigrated":true,"customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","entityId":"1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45","paymentTerm":"net30","billToAddressId":"9f3e6d81-b7d0-4aec-8c3f-2e8f70b13a45","soldToAddressId":"b7d0aec3-9f3e-4d81-8c3f-6d81b7d0aec3","totalAmount":"1200.00","lastModifiedDate":"2026-01-15T09:12:44.000Z"}},"summary":"Loading a migrated debit memo. isMigrated skips the open-period check on debitMemoDate and marks the journal entry for auto-reversal."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CREDIT_MEMO_NOT_FOUND, CREDIT_MEMO_LINE_NOT_FOUND, PRODUCT_NOT_FOUND, ACCOUNT_NOT_FOUND, ADDRESS_NOT_FOUND, INVALID_AMOUNT, INVALID_ENUM_VALUE, NO_LINES, MISSING_REQUIRED_FIELD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoId":{"type":"string"}},"additionalProperties":false,"required":["creditMemoId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["creditMemoLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoId":{"type":"string"}},"additionalProperties":false,"required":["creditMemoId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["creditMemoLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoId":{"type":"string"}},"additionalProperties":false,"required":["creditMemoId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["creditMemoLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDebitMemoInput"},"examples":{"approvedOnCreate":{"value":{"creditMemoId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","debitMemoDate":"2026-01-15","paymentTerm":"net30","isMigrated":true,"lines":[{"creditMemoLineId":"7d34c8e9-b21f-4a5c-9f3e-6d81b7d0aec3","description":"Opening balance carry-over","totalPrice":"1200.00"}]},"summary":"Loading a migrated debit memo. isMigrated skips the open-period check on debitMemoDate and marks the journal entry for auto-reversal."}}}}},"summary":"Create a debit memo","description":"Creates a debit memo to settle a source credit memo. The customer, legal entity, and currency come from the credit memo named by creditMemoId, not from the request. debitMemoType, billToAddressId, and soldToAddressId default to the credit memo's values when you leave them out.\n\nBy default, the debit memo is approved as it's created, and its journal entry is created in the general ledger in the same request. In a tenant where debit memos go through approval, it's created as a draft instead, with no journal entry.\n\nThe response contains the created debit memo, including its lines.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingDebitMemos"]},"get":{"operationId":"debitMemos","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[creditMemoId]","in":"query","required":false,"description":"Filter creditMemoId (equality)","schema":{"type":"string"}},{"name":"filter[creditMemoId][ne]","in":"query","required":false,"description":"Filter creditMemoId (ne)","schema":{"type":"string"}},{"name":"filter[creditMemoId][gt]","in":"query","required":false,"description":"Filter creditMemoId (gt)","schema":{"type":"string"}},{"name":"filter[creditMemoId][gte]","in":"query","required":false,"description":"Filter creditMemoId (gte)","schema":{"type":"string"}},{"name":"filter[creditMemoId][lt]","in":"query","required":false,"description":"Filter creditMemoId (lt)","schema":{"type":"string"}},{"name":"filter[creditMemoId][lte]","in":"query","required":false,"description":"Filter creditMemoId (lte)","schema":{"type":"string"}},{"name":"filter[creditMemoId][in]","in":"query","required":false,"description":"Filter creditMemoId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoId][notIn]","in":"query","required":false,"description":"Filter creditMemoId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoId][between]","in":"query","required":false,"description":"Filter creditMemoId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[creditMemoId][like]","in":"query","required":false,"description":"Filter creditMemoId (like)","schema":{"type":"string"}},{"name":"filter[debitMemoDate]","in":"query","required":false,"description":"Filter debitMemoDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][ne]","in":"query","required":false,"description":"Filter debitMemoDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][gt]","in":"query","required":false,"description":"Filter debitMemoDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][gte]","in":"query","required":false,"description":"Filter debitMemoDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][lt]","in":"query","required":false,"description":"Filter debitMemoDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][lte]","in":"query","required":false,"description":"Filter debitMemoDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][in]","in":"query","required":false,"description":"Filter debitMemoDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoDate][notIn]","in":"query","required":false,"description":"Filter debitMemoDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoDate][between]","in":"query","required":false,"description":"Filter debitMemoDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[taxDate]","in":"query","required":false,"description":"Filter taxDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][ne]","in":"query","required":false,"description":"Filter taxDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][gt]","in":"query","required":false,"description":"Filter taxDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][gte]","in":"query","required":false,"description":"Filter taxDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][lt]","in":"query","required":false,"description":"Filter taxDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][lte]","in":"query","required":false,"description":"Filter taxDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][in]","in":"query","required":false,"description":"Filter taxDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxDate][notIn]","in":"query","required":false,"description":"Filter taxDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxDate][between]","in":"query","required":false,"description":"Filter taxDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus]","in":"query","required":false,"description":"Filter debitMemoStatus (equality)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][ne]","in":"query","required":false,"description":"Filter debitMemoStatus (ne)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][gt]","in":"query","required":false,"description":"Filter debitMemoStatus (gt)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][gte]","in":"query","required":false,"description":"Filter debitMemoStatus (gte)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][lt]","in":"query","required":false,"description":"Filter debitMemoStatus (lt)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][lte]","in":"query","required":false,"description":"Filter debitMemoStatus (lte)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][in]","in":"query","required":false,"description":"Filter debitMemoStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoStatus][notIn]","in":"query","required":false,"description":"Filter debitMemoStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoStatus][between]","in":"query","required":false,"description":"Filter debitMemoStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[debitMemoStatus][like]","in":"query","required":false,"description":"Filter debitMemoStatus (like)","schema":{"type":"string"}},{"name":"filter[debitMemoType]","in":"query","required":false,"description":"Filter debitMemoType (equality)","schema":{"type":"string"}},{"name":"filter[debitMemoType][ne]","in":"query","required":false,"description":"Filter debitMemoType (ne)","schema":{"type":"string"}},{"name":"filter[debitMemoType][gt]","in":"query","required":false,"description":"Filter debitMemoType (gt)","schema":{"type":"string"}},{"name":"filter[debitMemoType][gte]","in":"query","required":false,"description":"Filter debitMemoType (gte)","schema":{"type":"string"}},{"name":"filter[debitMemoType][lt]","in":"query","required":false,"description":"Filter debitMemoType (lt)","schema":{"type":"string"}},{"name":"filter[debitMemoType][lte]","in":"query","required":false,"description":"Filter debitMemoType (lte)","schema":{"type":"string"}},{"name":"filter[debitMemoType][in]","in":"query","required":false,"description":"Filter debitMemoType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoType][notIn]","in":"query","required":false,"description":"Filter debitMemoType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoType][between]","in":"query","required":false,"description":"Filter debitMemoType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[debitMemoType][like]","in":"query","required":false,"description":"Filter debitMemoType (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[paymentTerm]","in":"query","required":false,"description":"Filter paymentTerm (equality)","schema":{"type":"string"}},{"name":"filter[paymentTerm][ne]","in":"query","required":false,"description":"Filter paymentTerm (ne)","schema":{"type":"string"}},{"name":"filter[paymentTerm][gt]","in":"query","required":false,"description":"Filter paymentTerm (gt)","schema":{"type":"string"}},{"name":"filter[paymentTerm][gte]","in":"query","required":false,"description":"Filter paymentTerm (gte)","schema":{"type":"string"}},{"name":"filter[paymentTerm][lt]","in":"query","required":false,"description":"Filter paymentTerm (lt)","schema":{"type":"string"}},{"name":"filter[paymentTerm][lte]","in":"query","required":false,"description":"Filter paymentTerm (lte)","schema":{"type":"string"}},{"name":"filter[paymentTerm][in]","in":"query","required":false,"description":"Filter paymentTerm (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerm][notIn]","in":"query","required":false,"description":"Filter paymentTerm (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerm][between]","in":"query","required":false,"description":"Filter paymentTerm (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerm][like]","in":"query","required":false,"description":"Filter paymentTerm (like)","schema":{"type":"string"}},{"name":"filter[isMigrated]","in":"query","required":false,"description":"Filter isMigrated (equality)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][ne]","in":"query","required":false,"description":"Filter isMigrated (ne)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][gt]","in":"query","required":false,"description":"Filter isMigrated (gt)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][gte]","in":"query","required":false,"description":"Filter isMigrated (gte)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][lt]","in":"query","required":false,"description":"Filter isMigrated (lt)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][lte]","in":"query","required":false,"description":"Filter isMigrated (lte)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][in]","in":"query","required":false,"description":"Filter isMigrated (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isMigrated][notIn]","in":"query","required":false,"description":"Filter isMigrated (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isMigrated][between]","in":"query","required":false,"description":"Filter isMigrated (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[debitGlAccountId]","in":"query","required":false,"description":"Filter debitGlAccountId (equality)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][ne]","in":"query","required":false,"description":"Filter debitGlAccountId (ne)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][gt]","in":"query","required":false,"description":"Filter debitGlAccountId (gt)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][gte]","in":"query","required":false,"description":"Filter debitGlAccountId (gte)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][lt]","in":"query","required":false,"description":"Filter debitGlAccountId (lt)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][lte]","in":"query","required":false,"description":"Filter debitGlAccountId (lte)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][in]","in":"query","required":false,"description":"Filter debitGlAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitGlAccountId][notIn]","in":"query","required":false,"description":"Filter debitGlAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitGlAccountId][between]","in":"query","required":false,"description":"Filter debitGlAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[debitGlAccountId][like]","in":"query","required":false,"description":"Filter debitGlAccountId (like)","schema":{"type":"string"}},{"name":"filter[billToAddressId]","in":"query","required":false,"description":"Filter billToAddressId (equality)","schema":{"type":"string"}},{"name":"filter[billToAddressId][ne]","in":"query","required":false,"description":"Filter billToAddressId (ne)","schema":{"type":"string"}},{"name":"filter[billToAddressId][gt]","in":"query","required":false,"description":"Filter billToAddressId (gt)","schema":{"type":"string"}},{"name":"filter[billToAddressId][gte]","in":"query","required":false,"description":"Filter billToAddressId (gte)","schema":{"type":"string"}},{"name":"filter[billToAddressId][lt]","in":"query","required":false,"description":"Filter billToAddressId (lt)","schema":{"type":"string"}},{"name":"filter[billToAddressId][lte]","in":"query","required":false,"description":"Filter billToAddressId (lte)","schema":{"type":"string"}},{"name":"filter[billToAddressId][in]","in":"query","required":false,"description":"Filter billToAddressId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billToAddressId][notIn]","in":"query","required":false,"description":"Filter billToAddressId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billToAddressId][between]","in":"query","required":false,"description":"Filter billToAddressId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billToAddressId][like]","in":"query","required":false,"description":"Filter billToAddressId (like)","schema":{"type":"string"}},{"name":"filter[soldToAddressId]","in":"query","required":false,"description":"Filter soldToAddressId (equality)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][ne]","in":"query","required":false,"description":"Filter soldToAddressId (ne)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][gt]","in":"query","required":false,"description":"Filter soldToAddressId (gt)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][gte]","in":"query","required":false,"description":"Filter soldToAddressId (gte)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][lt]","in":"query","required":false,"description":"Filter soldToAddressId (lt)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][lte]","in":"query","required":false,"description":"Filter soldToAddressId (lte)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][in]","in":"query","required":false,"description":"Filter soldToAddressId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[soldToAddressId][notIn]","in":"query","required":false,"description":"Filter soldToAddressId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[soldToAddressId][between]","in":"query","required":false,"description":"Filter soldToAddressId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[soldToAddressId][like]","in":"query","required":false,"description":"Filter soldToAddressId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","creditMemoId","-creditMemoId","customerId","-customerId","entityId","-entityId","debitMemoDate","-debitMemoDate","dueDate","-dueDate","taxDate","-taxDate","approvalStatus","-approvalStatus","debitMemoStatus","-debitMemoStatus","debitMemoType","-debitMemoType","currency","-currency","paymentTerm","-paymentTerm","isMigrated","-isMigrated","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","debitMemoNumber","creditMemoId","creditMemoNumber","debitMemoDate","dueDate","taxDate","approvalStatus","debitMemoStatus","debitMemoType","currency","customerId","customerName","customerNumber","entityId","entityName","paymentTerm","purchaseOrder","customerMessage","externalDebitMemoId","isMigrated","debitGlAccountId","billToAddressId","soldToAddressId","subtotal","totalAmount","totalTax","totalAmountDebited","lineDiscounts","unappliedCreditAmount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/debitMemosRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List debit memos","description":"Lists debit memos. To filter by debit memo number, customer name or number, purchase order, customer message, or external identifier, use POST accounting/debit-memos/search.","tags":["accountingDebitMemos"]}},"/accounting/products/{id}/product-lines":{"post":{"operationId":"addAccountingProductLines","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/addAccountingProductLinesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND, UNKNOWN_PRICE_BOOK_IDS, UNKNOWN_BILLABLE_COMPONENT_IDS, UNKNOWN_TAX_ENTITY_IDS, UNSUPPORTED_LINE_TYPE, USAGE_PRICING_NOT_APPLICABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product you want to add product lines to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/addAccountingProductLinesInput"}}}},"summary":"Add product lines to a product","description":"Adds one or more product lines, each with optional pricing and tax records, to an existing product in a single request. If any product line can't be added, none are.\n\nThe response contains only the ids of the created product lines, in the order you sent them. Read each product line with GET accounting/product-lines/:id.\n\nA 'prepaid' line, or a 'recurring' line priced 'thresholdBased', also creates a paired 'usage' line whose id is not returned. To find the paired 'usage' line, use POST accounting/product-lines/search with filters.parentProductLineId set to the parent line's id.","tags":["accounting/products/productLines"]}},"/accounting/pricing/{id}":{"get":{"operationId":"getAccountingPricing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountingPricingOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the pricing header you want to retrieve."}],"summary":"Retrieve a pricing header","description":"Retrieves a pricing header. Use the pricing header's id, not its headerNumber.\n\nThe response includes the pricing header's price book entries, with their rate-card entries and external identifiers.","tags":["accounting/products/productLines"]}},"/accounting/sales-returns/{id}":{"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"]},"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"]}},"/accounting/price-books":{"post":{"operationId":"createPriceBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPriceBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"PRICE_BOOK_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPriceBookInput"}}}},"summary":"Create a price book","description":"Creates a price book. A price book created here always has isStandard set to false. Your tenant has exactly one standard price book, set up by seed data. This endpoint can't make another price book the standard.\n\nYou don't send priceBookNumber. The number comes from a number range.\n\nThe response contains only the new price book's id. Read the record with GET accounting/price-books/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPriceBooks"]},"get":{"operationId":"priceBooks","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isStandard]","in":"query","required":false,"description":"Filter isStandard (equality)","schema":{"type":"boolean"}},{"name":"filter[isStandard][ne]","in":"query","required":false,"description":"Filter isStandard (ne)","schema":{"type":"boolean"}},{"name":"filter[isStandard][gt]","in":"query","required":false,"description":"Filter isStandard (gt)","schema":{"type":"boolean"}},{"name":"filter[isStandard][gte]","in":"query","required":false,"description":"Filter isStandard (gte)","schema":{"type":"boolean"}},{"name":"filter[isStandard][lt]","in":"query","required":false,"description":"Filter isStandard (lt)","schema":{"type":"boolean"}},{"name":"filter[isStandard][lte]","in":"query","required":false,"description":"Filter isStandard (lte)","schema":{"type":"boolean"}},{"name":"filter[isStandard][in]","in":"query","required":false,"description":"Filter isStandard (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isStandard][notIn]","in":"query","required":false,"description":"Filter isStandard (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isStandard][between]","in":"query","required":false,"description":"Filter isStandard (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource]","in":"query","required":false,"description":"Filter dataSource (equality)","schema":{"type":"string"}},{"name":"filter[dataSource][ne]","in":"query","required":false,"description":"Filter dataSource (ne)","schema":{"type":"string"}},{"name":"filter[dataSource][gt]","in":"query","required":false,"description":"Filter dataSource (gt)","schema":{"type":"string"}},{"name":"filter[dataSource][gte]","in":"query","required":false,"description":"Filter dataSource (gte)","schema":{"type":"string"}},{"name":"filter[dataSource][lt]","in":"query","required":false,"description":"Filter dataSource (lt)","schema":{"type":"string"}},{"name":"filter[dataSource][lte]","in":"query","required":false,"description":"Filter dataSource (lte)","schema":{"type":"string"}},{"name":"filter[dataSource][in]","in":"query","required":false,"description":"Filter dataSource (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][notIn]","in":"query","required":false,"description":"Filter dataSource (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][between]","in":"query","required":false,"description":"Filter dataSource (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource][like]","in":"query","required":false,"description":"Filter dataSource (like)","schema":{"type":"string"}},{"name":"filter[createdDate]","in":"query","required":false,"description":"Filter createdDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][ne]","in":"query","required":false,"description":"Filter createdDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gt]","in":"query","required":false,"description":"Filter createdDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gte]","in":"query","required":false,"description":"Filter createdDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lt]","in":"query","required":false,"description":"Filter createdDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lte]","in":"query","required":false,"description":"Filter createdDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][in]","in":"query","required":false,"description":"Filter createdDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][notIn]","in":"query","required":false,"description":"Filter createdDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][between]","in":"query","required":false,"description":"Filter createdDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","priceBookName","-priceBookName","isStandard","-isStandard","active","-active","dataSource","-dataSource","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","priceBookName","priceBookNumber","description","active","isStandard","dataSource","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/priceBooksRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List price books","description":"Lists price books. To match on name or price book number, use POST accounting/price-books/search.","tags":["accountingPriceBooks"]}},"/accounting/period-status":{"get":{"operationId":"accountingPeriodStatuses","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId]","in":"query","required":false,"description":"Filter accountingPeriodId (equality)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][ne]","in":"query","required":false,"description":"Filter accountingPeriodId (ne)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gt]","in":"query","required":false,"description":"Filter accountingPeriodId (gt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gte]","in":"query","required":false,"description":"Filter accountingPeriodId (gte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lt]","in":"query","required":false,"description":"Filter accountingPeriodId (lt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lte]","in":"query","required":false,"description":"Filter accountingPeriodId (lte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][in]","in":"query","required":false,"description":"Filter accountingPeriodId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][notIn]","in":"query","required":false,"description":"Filter accountingPeriodId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][between]","in":"query","required":false,"description":"Filter accountingPeriodId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountingPeriodId][like]","in":"query","required":false,"description":"Filter accountingPeriodId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[periodName]","in":"query","required":false,"description":"Filter periodName (equality)","schema":{"type":"string"}},{"name":"filter[periodName][ne]","in":"query","required":false,"description":"Filter periodName (ne)","schema":{"type":"string"}},{"name":"filter[periodName][gt]","in":"query","required":false,"description":"Filter periodName (gt)","schema":{"type":"string"}},{"name":"filter[periodName][gte]","in":"query","required":false,"description":"Filter periodName (gte)","schema":{"type":"string"}},{"name":"filter[periodName][lt]","in":"query","required":false,"description":"Filter periodName (lt)","schema":{"type":"string"}},{"name":"filter[periodName][lte]","in":"query","required":false,"description":"Filter periodName (lte)","schema":{"type":"string"}},{"name":"filter[periodName][in]","in":"query","required":false,"description":"Filter periodName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][notIn]","in":"query","required":false,"description":"Filter periodName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][between]","in":"query","required":false,"description":"Filter periodName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[periodName][like]","in":"query","required":false,"description":"Filter periodName (like)","schema":{"type":"string"}},{"name":"filter[fiscalYear]","in":"query","required":false,"description":"Filter fiscalYear (equality)","schema":{"type":"string"}},{"name":"filter[fiscalYear][ne]","in":"query","required":false,"description":"Filter fiscalYear (ne)","schema":{"type":"string"}},{"name":"filter[fiscalYear][gt]","in":"query","required":false,"description":"Filter fiscalYear (gt)","schema":{"type":"string"}},{"name":"filter[fiscalYear][gte]","in":"query","required":false,"description":"Filter fiscalYear (gte)","schema":{"type":"string"}},{"name":"filter[fiscalYear][lt]","in":"query","required":false,"description":"Filter fiscalYear (lt)","schema":{"type":"string"}},{"name":"filter[fiscalYear][lte]","in":"query","required":false,"description":"Filter fiscalYear (lte)","schema":{"type":"string"}},{"name":"filter[fiscalYear][in]","in":"query","required":false,"description":"Filter fiscalYear (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYear][notIn]","in":"query","required":false,"description":"Filter fiscalYear (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYear][between]","in":"query","required":false,"description":"Filter fiscalYear (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalYear][like]","in":"query","required":false,"description":"Filter fiscalYear (like)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter]","in":"query","required":false,"description":"Filter fiscalQuarter (equality)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][ne]","in":"query","required":false,"description":"Filter fiscalQuarter (ne)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][gt]","in":"query","required":false,"description":"Filter fiscalQuarter (gt)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][gte]","in":"query","required":false,"description":"Filter fiscalQuarter (gte)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][lt]","in":"query","required":false,"description":"Filter fiscalQuarter (lt)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][lte]","in":"query","required":false,"description":"Filter fiscalQuarter (lte)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][in]","in":"query","required":false,"description":"Filter fiscalQuarter (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalQuarter][notIn]","in":"query","required":false,"description":"Filter fiscalQuarter (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalQuarter][between]","in":"query","required":false,"description":"Filter fiscalQuarter (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalQuarter][like]","in":"query","required":false,"description":"Filter fiscalQuarter (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[reopenedByCascade]","in":"query","required":false,"description":"Filter reopenedByCascade (equality)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][ne]","in":"query","required":false,"description":"Filter reopenedByCascade (ne)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][gt]","in":"query","required":false,"description":"Filter reopenedByCascade (gt)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][gte]","in":"query","required":false,"description":"Filter reopenedByCascade (gte)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][lt]","in":"query","required":false,"description":"Filter reopenedByCascade (lt)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][lte]","in":"query","required":false,"description":"Filter reopenedByCascade (lte)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][in]","in":"query","required":false,"description":"Filter reopenedByCascade (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reopenedByCascade][notIn]","in":"query","required":false,"description":"Filter reopenedByCascade (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reopenedByCascade][between]","in":"query","required":false,"description":"Filter reopenedByCascade (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[postable]","in":"query","required":false,"description":"Filter postable (equality)","schema":{"type":"boolean"}},{"name":"filter[postable][ne]","in":"query","required":false,"description":"Filter postable (ne)","schema":{"type":"boolean"}},{"name":"filter[postable][gt]","in":"query","required":false,"description":"Filter postable (gt)","schema":{"type":"boolean"}},{"name":"filter[postable][gte]","in":"query","required":false,"description":"Filter postable (gte)","schema":{"type":"boolean"}},{"name":"filter[postable][lt]","in":"query","required":false,"description":"Filter postable (lt)","schema":{"type":"boolean"}},{"name":"filter[postable][lte]","in":"query","required":false,"description":"Filter postable (lte)","schema":{"type":"boolean"}},{"name":"filter[postable][in]","in":"query","required":false,"description":"Filter postable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postable][notIn]","in":"query","required":false,"description":"Filter postable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postable][between]","in":"query","required":false,"description":"Filter postable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","periodName","-periodName","fiscalYear","-fiscalYear","fiscalQuarter","-fiscalQuarter","startDate","-startDate","endDate","-endDate","status","-status","postable","-postable","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","accountingPeriodId","entityId","entityName","bookId","bookName","periodName","fiscalYear","fiscalQuarter","startDate","endDate","status","reopeningReason","reopenedByCascade","postable","postableReason","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/accountingPeriodStatusesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List accounting period statuses","description":"Lists accounting period statuses. Each item is one period for one legal entity and one accounting book.\n\nTo read an item with its period-close checklist, use GET accounting/period-status/:id.","tags":["accountingAccountingPeriodStatuses"]}},"/accounting/period-status/{id}/execute-task":{"post":{"operationId":"executeAccountingPeriodTask","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/executeAccountingPeriodTaskOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNKNOWN_TASK, TASK_NOT_EXECUTABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TASK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"task":{"type":"string","description":"The task code you sent."},"allowedTasks":{"type":"string","description":"A comma-separated list of the task codes this endpoint accepts."}},"additionalProperties":false,"required":["task","allowedTasks"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_NOT_EXECUTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the period status row the task was attempted against."},"task":{"type":"string","description":"The task code that could not run."},"reason":{"type":"string","description":"Why the task cannot run now, from the close process's precondition check, for example 'Close task may only be executed after Lock Journals.'"}},"additionalProperties":false,"required":["id","task","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TASK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"task":{"type":"string","description":"The task code you sent."},"allowedTasks":{"type":"string","description":"A comma-separated list of the task codes this endpoint accepts."}},"additionalProperties":false,"required":["task","allowedTasks"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_NOT_EXECUTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the period status row the task was attempted against."},"task":{"type":"string","description":"The task code that could not run."},"reason":{"type":"string","description":"Why the task cannot run now, from the close process's precondition check, for example 'Close task may only be executed after Lock Journals.'"}},"additionalProperties":false,"required":["id","task","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TASK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"task":{"type":"string","description":"The task code you sent."},"allowedTasks":{"type":"string","description":"A comma-separated list of the task codes this endpoint accepts."}},"additionalProperties":false,"required":["task","allowedTasks"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_NOT_EXECUTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the period status row the task was attempted against."},"task":{"type":"string","description":"The task code that could not run."},"reason":{"type":"string","description":"Why the task cannot run now, from the close process's precondition check, for example 'Close task may only be executed after Lock Journals.'"}},"additionalProperties":false,"required":["id","task","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the entity-book period status row to run the task against. This is the id of a record from GET accounting/period-status, not the shared accountingPeriodId."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/executeAccountingPeriodTaskInput"}}}},"summary":"Run a period-close task","description":"Runs a period-close task. A task runs on one accounting period status. For example, it opens, closes, or reopens the period, or locks or unlocks accounts payable (AP), accounts receivable (AR), journals, or revenue.\n\nSome tasks also change related periods. 'open' also opens earlier periods of the same legal entity and accounting book that aren't open yet. 'reopen' and the unlock tasks also reopen later closed periods, and the parent legal entity's period if it is closed. 'lockAR', 'unlockAR', 'lockAP', and 'unlockAP' also apply to the legal entity's other accounting books.\n\nBefore you send the request, read closeTasks on GET accounting/period-status/:id. For a task in the list, check isExecutable. For 'reopen' or an unlock task, check isReversible on the task it undoes.\n\nThe response is empty. Read the result with GET accounting/period-status/:id.","tags":["accountingAccountingPeriodStatuses"]}},"/accounting/credit-memos/search":{"post":{"operationId":"searchCreditMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchCreditMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_TIMESTAMP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchCreditMemoInput"}}}},"summary":"Search credit memos","description":"Searches credit memos.","tags":["accountingCreditMemos"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/invoice-runs":{"get":{"operationId":"invoiceRuns","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber]","in":"query","required":false,"description":"Filter invoiceRunNumber (equality)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][ne]","in":"query","required":false,"description":"Filter invoiceRunNumber (ne)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][gt]","in":"query","required":false,"description":"Filter invoiceRunNumber (gt)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][gte]","in":"query","required":false,"description":"Filter invoiceRunNumber (gte)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][lt]","in":"query","required":false,"description":"Filter invoiceRunNumber (lt)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][lte]","in":"query","required":false,"description":"Filter invoiceRunNumber (lte)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][in]","in":"query","required":false,"description":"Filter invoiceRunNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceRunNumber][notIn]","in":"query","required":false,"description":"Filter invoiceRunNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceRunNumber][between]","in":"query","required":false,"description":"Filter invoiceRunNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceRunNumber][like]","in":"query","required":false,"description":"Filter invoiceRunNumber (like)","schema":{"type":"string"}},{"name":"filter[trigger]","in":"query","required":false,"description":"Filter trigger (equality)","schema":{"type":"string"}},{"name":"filter[trigger][ne]","in":"query","required":false,"description":"Filter trigger (ne)","schema":{"type":"string"}},{"name":"filter[trigger][gt]","in":"query","required":false,"description":"Filter trigger (gt)","schema":{"type":"string"}},{"name":"filter[trigger][gte]","in":"query","required":false,"description":"Filter trigger (gte)","schema":{"type":"string"}},{"name":"filter[trigger][lt]","in":"query","required":false,"description":"Filter trigger (lt)","schema":{"type":"string"}},{"name":"filter[trigger][lte]","in":"query","required":false,"description":"Filter trigger (lte)","schema":{"type":"string"}},{"name":"filter[trigger][in]","in":"query","required":false,"description":"Filter trigger (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[trigger][notIn]","in":"query","required":false,"description":"Filter trigger (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[trigger][between]","in":"query","required":false,"description":"Filter trigger (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[trigger][like]","in":"query","required":false,"description":"Filter trigger (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[salesOrderId]","in":"query","required":false,"description":"Filter salesOrderId (equality)","schema":{"type":"string"}},{"name":"filter[salesOrderId][ne]","in":"query","required":false,"description":"Filter salesOrderId (ne)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gt]","in":"query","required":false,"description":"Filter salesOrderId (gt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gte]","in":"query","required":false,"description":"Filter salesOrderId (gte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lt]","in":"query","required":false,"description":"Filter salesOrderId (lt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lte]","in":"query","required":false,"description":"Filter salesOrderId (lte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][in]","in":"query","required":false,"description":"Filter salesOrderId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][notIn]","in":"query","required":false,"description":"Filter salesOrderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][between]","in":"query","required":false,"description":"Filter salesOrderId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[salesOrderId][like]","in":"query","required":false,"description":"Filter salesOrderId (like)","schema":{"type":"string"}},{"name":"filter[startedAt]","in":"query","required":false,"description":"Filter startedAt (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][ne]","in":"query","required":false,"description":"Filter startedAt (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][gt]","in":"query","required":false,"description":"Filter startedAt (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][gte]","in":"query","required":false,"description":"Filter startedAt (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][lt]","in":"query","required":false,"description":"Filter startedAt (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][lte]","in":"query","required":false,"description":"Filter startedAt (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][in]","in":"query","required":false,"description":"Filter startedAt (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startedAt][notIn]","in":"query","required":false,"description":"Filter startedAt (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startedAt][between]","in":"query","required":false,"description":"Filter startedAt (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[finishedAt]","in":"query","required":false,"description":"Filter finishedAt (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][ne]","in":"query","required":false,"description":"Filter finishedAt (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][gt]","in":"query","required":false,"description":"Filter finishedAt (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][gte]","in":"query","required":false,"description":"Filter finishedAt (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][lt]","in":"query","required":false,"description":"Filter finishedAt (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][lte]","in":"query","required":false,"description":"Filter finishedAt (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][in]","in":"query","required":false,"description":"Filter finishedAt (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[finishedAt][notIn]","in":"query","required":false,"description":"Filter finishedAt (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[finishedAt][between]","in":"query","required":false,"description":"Filter finishedAt (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["invoiceRunNumber","-invoiceRunNumber","startedAt","-startedAt","finishedAt","-finishedAt","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","invoiceRunNumber","status","invoicesCreated","trigger","scope","entityId","salesOrderId","startedAt","finishedAt","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceRunsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completed","invoicesCreated":3,"trigger":"immediately","scope":"all","entityId":"6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53","salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","startedAt":"2026-09-30T08:14:22.000Z","finishedAt":"2026-09-30T08:14:41.000Z","lastModifiedDate":"2026-09-30T08:14:41.000Z"},{"id":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91","invoiceRunNumber":"ISR-1039","status":"completeAndError","invoicesCreated":12,"trigger":"monthly","scope":"oneTimeAndRecurring;usageInArrears","entityId":"6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53","startedAt":"2026-09-01T02:00:00.000Z","finishedAt":"2026-09-01T02:07:33.000Z","lastModifiedDate":"2026-09-01T02:07:33.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List invoice runs","description":"Lists invoice runs. The collection doesn't include customerId, invoices, errors, or progress. To see a run's invoices and errors, use GET accounting/invoice-runs/:id.\n\nIf a run shows 'running' for much longer than a run usually takes, read the run with GET accounting/invoice-runs/:id to get its corrected 'status'. 'scope' here is one text value, where GET accounting/invoice-runs/:id returns an array.\n\nTo find a customer's invoices, use GET accounting/invoices filtered by customerId.","tags":["accountingInvoiceRuns"]},"post":{"operationId":"startInvoiceRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/startInvoiceRunOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"INVOICE_RUN_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_HELD_BACK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unresolvedRunId":{"type":"string"}},"additionalProperties":false,"required":["unresolvedRunId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false},"examples":{"chosenInstalments":{"value":{"data":{"data":{"id":"b3f7a219-8d64-4c05-9e42-1a8f0b5d6c27","invoiceRunNumber":"ISR-1043","status":"running","invoicesCreated":0}}},"summary":"Bill two named installments of one order and nothing else"},"customerUpTo":{"value":{"data":{"data":{"id":"5e2a9c81-7f43-4b60-8d19-3c6b0a4e8f52","invoiceRunNumber":"ISR-1044","status":"running","invoicesCreated":0}}},"summary":"Bill a whole customer up to a cut-off, asynchronously"},"heldBackByEarlierFailure":{"value":{"data":{"data":{"id":"9a7c4e12-6b58-4d03-8f27-2e5a1b9c0d46","invoiceRunNumber":"ISR-1045","status":"completed","invoicesCreated":0,"unresolvedRunId":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91"}}},"summary":"The selection produced nothing because an earlier run's failures are held back"},"wholeEntityUpTo":{"value":{"data":{"data":{"id":"7c4d1e93-2a58-4f16-b073-5e9a2c8b4d61","invoiceRunNumber":"ISR-1046","status":"running","invoicesCreated":0}}},"summary":"Bill every approved order in a legal entity up to a cut-off — the scope the scheduled nightly run uses"},"wholeOrder":{"value":{"data":{"data":{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completed","invoicesCreated":3}}},"summary":"Bill everything a sales order has pending, waiting for the result"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_TARGET_GIVEN, MULTIPLE_TARGETS_GIVEN, SALES_ORDER_NOT_FOUND, CUSTOMER_NOT_FOUND, ENTITY_NOT_FOUND, SALES_ORDER_EXTERNALISED, SALES_ORDER_NOT_APPROVED, BILL_UP_TO_NOT_APPLICABLE, BILLING_DATES_NOT_APPLICABLE, BILL_UP_TO_REQUIRED, ACCOUNTING_PERIOD_CLOSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_TARGET_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_TARGETS_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"given":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["given"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_DATES_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_HELD_BACK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unresolvedRunId":{"type":"string"}},"additionalProperties":false,"required":["unresolvedRunId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_TARGET_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_TARGETS_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"given":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["given"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_DATES_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_HELD_BACK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unresolvedRunId":{"type":"string"}},"additionalProperties":false,"required":["unresolvedRunId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_TARGET_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_TARGETS_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"given":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["given"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_DATES_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_HELD_BACK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unresolvedRunId":{"type":"string"}},"additionalProperties":false,"required":["unresolvedRunId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/startInvoiceRunInput"},"examples":{"chosenInstalments":{"value":{"salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","billingDates":["2026-09-01","2026-10-01"]},"summary":"Bill two named installments of one order and nothing else"},"customerUpTo":{"value":{"customerId":"d41d8cd9-8f00-4b20-a204-9800998ecf84","billUpTo":"2026-09-30","scope":["oneTimeAndRecurring"]},"summary":"Bill a whole customer up to a cut-off, asynchronously"},"heldBackByEarlierFailure":{"value":{"salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","sync":true},"summary":"The selection produced nothing because an earlier run's failures are held back"},"wholeEntityUpTo":{"value":{"entityId":"6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53","billUpTo":"2026-09-30"},"summary":"Bill every approved order in a legal entity up to a cut-off — the scope the scheduled nightly run uses"},"wholeOrder":{"value":{"salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","sync":true},"summary":"Bill everything a sales order has pending, waiting for the result"}}}}},"summary":"Start an invoice run","description":"Starts an invoice run for a sales order, customer, or legal entity. A run links each invoice it creates to itself and saves an error for each line that fails. The response contains the run's id.\n\nSend exactly one of 'salesOrderId', 'customerId', or 'entityId'. The date field you send depends on that choice. A sales order run takes 'billingDates', the exact planned dates to invoice, and a customer or legal entity run needs 'billUpTo', which invoices everything planned on or before that date.\n\nBy default the request returns while the run is working, and you poll GET accounting/invoice-runs/:id. Set 'sync' to true to wait for the final status instead. A customer or legal entity run can take minutes, so use 'sync' for a single sales order.\n\nA new run leaves out lines that failed in an earlier run. For a sales order run with 'sync' set to true, if that leaves nothing to invoice, the response includes 'unresolvedRunId'. Send POST accounting/invoice-runs/:id/rerun for that run instead of repeating this request.\n\nWhile an asynchronous run is working, another request with the same target, 'scope', dates, and 'invoiceDate' joins that run and doesn't invoice the same lines twice. The response then has 'deduplicated' set to true, so you can retry a request that timed out. After the run finishes, the same request starts a new run.\n\nThis protection doesn't apply when 'sync' is true, so two identical requests with 'sync' set to true can both invoice the same lines.\n\nFor a sales order that another system invoices, the request fails with SALES_ORDER_EXTERNALISED. Import its invoices with POST accounting/invoices/import.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingInvoiceRuns"]}},"/accounting/products/{id}":{"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"]},"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"]}},"/accounting/performance-obligations":{"get":{"operationId":"performanceObligations","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber]","in":"query","required":false,"description":"Filter performanceObligationNumber (equality)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][ne]","in":"query","required":false,"description":"Filter performanceObligationNumber (ne)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][gt]","in":"query","required":false,"description":"Filter performanceObligationNumber (gt)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][gte]","in":"query","required":false,"description":"Filter performanceObligationNumber (gte)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][lt]","in":"query","required":false,"description":"Filter performanceObligationNumber (lt)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][lte]","in":"query","required":false,"description":"Filter performanceObligationNumber (lte)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][in]","in":"query","required":false,"description":"Filter performanceObligationNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[performanceObligationNumber][notIn]","in":"query","required":false,"description":"Filter performanceObligationNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[performanceObligationNumber][between]","in":"query","required":false,"description":"Filter performanceObligationNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[performanceObligationNumber][like]","in":"query","required":false,"description":"Filter performanceObligationNumber (like)","schema":{"type":"string"}},{"name":"filter[effectiveStartDate]","in":"query","required":false,"description":"Filter effectiveStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][ne]","in":"query","required":false,"description":"Filter effectiveStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][gt]","in":"query","required":false,"description":"Filter effectiveStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][gte]","in":"query","required":false,"description":"Filter effectiveStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][lt]","in":"query","required":false,"description":"Filter effectiveStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][lte]","in":"query","required":false,"description":"Filter effectiveStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][in]","in":"query","required":false,"description":"Filter effectiveStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveStartDate][notIn]","in":"query","required":false,"description":"Filter effectiveStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveStartDate][between]","in":"query","required":false,"description":"Filter effectiveStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[effectiveEndDate]","in":"query","required":false,"description":"Filter effectiveEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][ne]","in":"query","required":false,"description":"Filter effectiveEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][gt]","in":"query","required":false,"description":"Filter effectiveEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][gte]","in":"query","required":false,"description":"Filter effectiveEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][lt]","in":"query","required":false,"description":"Filter effectiveEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][lte]","in":"query","required":false,"description":"Filter effectiveEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][in]","in":"query","required":false,"description":"Filter effectiveEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveEndDate][notIn]","in":"query","required":false,"description":"Filter effectiveEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveEndDate][between]","in":"query","required":false,"description":"Filter effectiveEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[allocationStartDate]","in":"query","required":false,"description":"Filter allocationStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][ne]","in":"query","required":false,"description":"Filter allocationStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][gt]","in":"query","required":false,"description":"Filter allocationStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][gte]","in":"query","required":false,"description":"Filter allocationStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][lt]","in":"query","required":false,"description":"Filter allocationStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][lte]","in":"query","required":false,"description":"Filter allocationStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][in]","in":"query","required":false,"description":"Filter allocationStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allocationStartDate][notIn]","in":"query","required":false,"description":"Filter allocationStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allocationStartDate][between]","in":"query","required":false,"description":"Filter allocationStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isAllocationExcluded]","in":"query","required":false,"description":"Filter isAllocationExcluded (equality)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][ne]","in":"query","required":false,"description":"Filter isAllocationExcluded (ne)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][gt]","in":"query","required":false,"description":"Filter isAllocationExcluded (gt)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][gte]","in":"query","required":false,"description":"Filter isAllocationExcluded (gte)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][lt]","in":"query","required":false,"description":"Filter isAllocationExcluded (lt)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][lte]","in":"query","required":false,"description":"Filter isAllocationExcluded (lte)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][in]","in":"query","required":false,"description":"Filter isAllocationExcluded (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isAllocationExcluded][notIn]","in":"query","required":false,"description":"Filter isAllocationExcluded (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isAllocationExcluded][between]","in":"query","required":false,"description":"Filter isAllocationExcluded (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isNetAccounting]","in":"query","required":false,"description":"Filter isNetAccounting (equality)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][ne]","in":"query","required":false,"description":"Filter isNetAccounting (ne)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][gt]","in":"query","required":false,"description":"Filter isNetAccounting (gt)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][gte]","in":"query","required":false,"description":"Filter isNetAccounting (gte)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][lt]","in":"query","required":false,"description":"Filter isNetAccounting (lt)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][lte]","in":"query","required":false,"description":"Filter isNetAccounting (lte)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][in]","in":"query","required":false,"description":"Filter isNetAccounting (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isNetAccounting][notIn]","in":"query","required":false,"description":"Filter isNetAccounting (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isNetAccounting][between]","in":"query","required":false,"description":"Filter isNetAccounting (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[defaultAmortizationMethod]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (equality)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][ne]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (ne)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][gt]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (gt)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][gte]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (gte)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][lt]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (lt)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][lte]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (lte)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][in]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultAmortizationMethod][notIn]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultAmortizationMethod][between]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[defaultAmortizationMethod][like]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (like)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (equality)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][ne]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (ne)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][gt]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (gt)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][gte]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (gte)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][lt]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (lt)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][lte]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (lte)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][in]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[standaloneSellingPriceRangeType][notIn]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[standaloneSellingPriceRangeType][between]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[standaloneSellingPriceRangeType][like]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (like)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (equality)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][ne]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (ne)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][gt]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (gt)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][gte]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (gte)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][lt]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (lt)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][lte]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (lte)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][in]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateName][notIn]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateName][between]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateName][like]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","performanceObligationNumber","-performanceObligationNumber","name","-name","effectiveStartDate","-effectiveStartDate","effectiveEndDate","-effectiveEndDate","allocationStartDate","-allocationStartDate","isAllocationExcluded","-isAllocationExcluded","isNetAccounting","-isNetAccounting","defaultAmortizationMethod","-defaultAmortizationMethod","standaloneSellingPriceRangeType","-standaloneSellingPriceRangeType","revenueSchedulingTemplateName","-revenueSchedulingTemplateName","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","performanceObligationNumber","name","description","effectiveStartDate","effectiveEndDate","allocationStartDate","isAllocationExcluded","isNetAccounting","defaultAmortizationMethod","standaloneSellingPriceRangeType","revenueSchedulingTemplateName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/performanceObligationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List performance obligations","description":"Lists performance obligations. The collection doesn't include standaloneSellingPriceRanges, revenueSchedulingTemplateId, or standaloneSellingPriceStratificationConfigurationId. To get these fields, use GET accounting/performance-obligations/:id or POST accounting/performance-obligations/search.","tags":["accountingPerformanceObligations"]}},"/accounting/subscriptions/{id}/cancel":{"post":{"operationId":"cancelSubscription","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/cancelSubscriptionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: SUBSCRIPTION_NOT_FOUND, ALREADY_CANCELLED, CANCELLATION_DATE_WITHIN_BILLING_PERIOD, CANCELLATION_DATE_BEFORE_INVOICED_PERIOD, CANCELLATION_DATE_OUTSIDE_SERVICE_PERIOD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_CANCELLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_WITHIN_BILLING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"periodStartDate":{"type":"string"},"periodEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_BEFORE_INVOICED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"lastInvoicedServiceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","lastInvoicedServiceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"serviceStartDate":{"type":"string"},"serviceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","serviceStartDate","serviceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_CANCELLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_WITHIN_BILLING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"periodStartDate":{"type":"string"},"periodEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_BEFORE_INVOICED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"lastInvoicedServiceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","lastInvoicedServiceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"serviceStartDate":{"type":"string"},"serviceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","serviceStartDate","serviceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_CANCELLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_WITHIN_BILLING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"periodStartDate":{"type":"string"},"periodEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_BEFORE_INVOICED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"lastInvoicedServiceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","lastInvoicedServiceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"serviceStartDate":{"type":"string"},"serviceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","serviceStartDate","serviceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id of the subscription to cancel (a UUID); bound from the :id path segment."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cancelSubscriptionInput"}}}},"summary":"Cancel a subscription","description":"Cancels a subscription. Every line of the subscription ends on cancellationDate, and the subscription ends in a canceled state.\n\nFor a termed subscription, every planned invoice dated on or after cancellationDate is created at once, with cancellationDate as the invoice date. Pay-as-you-go invoices are the exception. For an evergreen subscription, the planned invoices after cancellationDate are removed, and a final prorated invoice up to cancellationDate is planned. That invoice is created at once only when invoiceImmediately is true.\n\nTo cancel only some lines, or to combine a cancellation with other changes, use POST accounting/subscriptions/:id/modify.","tags":["accountingSubscriptions"]}},"/accounting/revenue-contracts/{id}":{"get":{"operationId":"getRevenueContract","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getRevenueContractOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revenue contract you want to retrieve."}],"summary":"Retrieve a revenue contract","description":"Retrieves a revenue contract. Use the revenue contract's id, not its revenueContractNumber.\n\nThe response includes the contract's revenue lines, each with its revenue plan and the plan's periods. POST accounting/revenue-contracts/search returns the same fields for each revenue contract.","tags":["accountingRevenueContracts"]}},"/accounting/products/{id}/product-lines/{productLineId}":{"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"]},"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"]}},"/accounting/sales-orders/{id}/approve":{"post":{"operationId":"approveSalesOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveSalesOrderOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was not approved."},"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was not approved."},"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was not approved."},"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the sales order to approve; bound from the :id path segment.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveSalesOrderInput"}}}},"summary":"Approve a sales order","description":"Approves a sales order. Runs the same pre-approval validations the UI gates on and then the full approval cascade — subscription activation, invoice-plan generation, prepaid balances, early-renewal invoicing, draft cleanup, business versioning and metrics. Idempotent: an already-approved order is a no-op success. Does not approve the order's revenue contract. Returns an empty output. Every request must carry the Api-Version header.\n\n```\nPOST accounting/sales-orders/3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45/approve\n```\n\n**The body is empty and so is the response.** Read the order back with `GET accounting/sales-orders/{id}` to see its approved state.\n\nUntil now the only way to approve an order over the api was to send `approvalStatus: \"approved\"` when **creating** it. An order created without that, or one raised in the UI, had no api route to approval at all. This is that route.\n\n**Approval is what makes an order real.** It runs the same pre-approval validations the UI gates on — milestone configuration, custom invoice plans, VAT estimation, the one-time discount account, subscription status — and then the whole cascade behind them: subscriptions activate, the invoice plan is generated, prepaid balances are created, early renewals are invoiced, superseded draft modifications are cleaned up, business-version logs and metrics are written. An order refused by a validation rule is left **entirely** untouched; the call runs in a transaction, so a failure part-way leaves nothing behind.\n\n**Approving is idempotent.** An order that is already approved returns success and changes nothing — the cascade is deliberately not re-run, since it creates prepaid balances and deletes drafts. The `SALES_ORDER_ALREADY_APPROVED` information diagnostic is how a caller tells that case from a fresh approval (`SALES_ORDER_APPROVED`), so a retry after a timeout is safe.\n\n**It does NOT approve the order's revenue contract.** That is a separate, explicit call: `POST accounting/revenue-contracts/{id}/approve`. The order must be approved first — the contract's own route refuses it otherwise.\n\nApproving an id that does not exist is `NOT_FOUND`, not a silent success.","tags":["accountingSalesOrders"]}},"/accounting/customers":{"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"]},"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"]}},"/accounting/accounts/{id}":{"get":{"operationId":"getAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the account to return."}],"summary":"Retrieve an account","description":"Retrieves an account. Use the account's id, not its accountNumber.","tags":["accountingAccounts"]}},"/accounting/books":{"get":{"operationId":"books","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[accountingStandard]","in":"query","required":false,"description":"Filter accountingStandard (equality)","schema":{"type":"string"}},{"name":"filter[accountingStandard][ne]","in":"query","required":false,"description":"Filter accountingStandard (ne)","schema":{"type":"string"}},{"name":"filter[accountingStandard][gt]","in":"query","required":false,"description":"Filter accountingStandard (gt)","schema":{"type":"string"}},{"name":"filter[accountingStandard][gte]","in":"query","required":false,"description":"Filter accountingStandard (gte)","schema":{"type":"string"}},{"name":"filter[accountingStandard][lt]","in":"query","required":false,"description":"Filter accountingStandard (lt)","schema":{"type":"string"}},{"name":"filter[accountingStandard][lte]","in":"query","required":false,"description":"Filter accountingStandard (lte)","schema":{"type":"string"}},{"name":"filter[accountingStandard][in]","in":"query","required":false,"description":"Filter accountingStandard (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingStandard][notIn]","in":"query","required":false,"description":"Filter accountingStandard (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingStandard][between]","in":"query","required":false,"description":"Filter accountingStandard (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountingStandard][like]","in":"query","required":false,"description":"Filter accountingStandard (like)","schema":{"type":"string"}},{"name":"filter[consolidation]","in":"query","required":false,"description":"Filter consolidation (equality)","schema":{"type":"boolean"}},{"name":"filter[consolidation][ne]","in":"query","required":false,"description":"Filter consolidation (ne)","schema":{"type":"boolean"}},{"name":"filter[consolidation][gt]","in":"query","required":false,"description":"Filter consolidation (gt)","schema":{"type":"boolean"}},{"name":"filter[consolidation][gte]","in":"query","required":false,"description":"Filter consolidation (gte)","schema":{"type":"boolean"}},{"name":"filter[consolidation][lt]","in":"query","required":false,"description":"Filter consolidation (lt)","schema":{"type":"boolean"}},{"name":"filter[consolidation][lte]","in":"query","required":false,"description":"Filter consolidation (lte)","schema":{"type":"boolean"}},{"name":"filter[consolidation][in]","in":"query","required":false,"description":"Filter consolidation (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[consolidation][notIn]","in":"query","required":false,"description":"Filter consolidation (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[consolidation][between]","in":"query","required":false,"description":"Filter consolidation (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[baseBookId]","in":"query","required":false,"description":"Filter baseBookId (equality)","schema":{"type":"string"}},{"name":"filter[baseBookId][ne]","in":"query","required":false,"description":"Filter baseBookId (ne)","schema":{"type":"string"}},{"name":"filter[baseBookId][gt]","in":"query","required":false,"description":"Filter baseBookId (gt)","schema":{"type":"string"}},{"name":"filter[baseBookId][gte]","in":"query","required":false,"description":"Filter baseBookId (gte)","schema":{"type":"string"}},{"name":"filter[baseBookId][lt]","in":"query","required":false,"description":"Filter baseBookId (lt)","schema":{"type":"string"}},{"name":"filter[baseBookId][lte]","in":"query","required":false,"description":"Filter baseBookId (lte)","schema":{"type":"string"}},{"name":"filter[baseBookId][in]","in":"query","required":false,"description":"Filter baseBookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[baseBookId][notIn]","in":"query","required":false,"description":"Filter baseBookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[baseBookId][between]","in":"query","required":false,"description":"Filter baseBookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[baseBookId][like]","in":"query","required":false,"description":"Filter baseBookId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","type","-type","accountingStandard","-accountingStandard","consolidation","-consolidation","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","type","accountingStandard","consolidation","description","baseBookId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/booksRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List accounting books","description":"Lists accounting books.","tags":["accountingBooks"]}},"/accounting/invoices/{id}/pay":{"post":{"operationId":"payInvoice","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/payInvoiceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"PAYMENT_RECORDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"full":{"value":{"data":{"paymentId":"7d41e9b2-58c6-4a03-9e17-2b8f0c5d6a39"}},"summary":"Settle an invoice in full by wire"},"partial":{"value":{"data":{"paymentId":"b6902f18-3d47-4c85-a0e2-1f7c8b4d5309"}},"summary":"A part payment by check, with the processor fee recorded beside it"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVOICE_NOT_FOUND, INVALID_AMOUNT, AMOUNT_EXCEEDS_DUE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_EXCEEDS_DUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","format":"decimal"},"amountDue":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["id","amount","amountDue"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_RECORDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_EXCEEDS_DUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","format":"decimal"},"amountDue":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["id","amount","amountDue"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_RECORDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_EXCEEDS_DUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","format":"decimal"},"amountDue":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["id","amount","amountDue"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_RECORDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice you want to settle.","examples":{"full":{"value":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"},"partial":{"value":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payInvoiceInput"},"examples":{"full":{"value":{"amount":"1210.00","paymentDate":"2026-09-15","paymentType":"wire"},"summary":"Settle an invoice in full by wire"},"partial":{"value":{"amount":"500.00","paymentDate":"2026-09-15","paymentType":"check","paymentNote":"Cheque 004312","bankFeeAmount":"3.00"},"summary":"A part payment by check, with the processor fee recorded beside it"}}}}},"summary":"Record a payment against an invoice","description":"Records a payment against an invoice. The payment is created for the invoice's customer and legal entity, using the entity's default electronic payment account. The payment is applied to the invoice and creates a journal entry in the general ledger. The response contains the new payment's id.\n\nYou can pay part of the amount due. For installments, send one request for each payment.\n\nSend an Idempotency-Key header. If you retry with the same key and body, you get the original response and no second payment is created. Without the header, retrying a request that succeeded creates a second payment.\n\nTo see the reduced totalAmountDue and the increased paymentsApplied, use GET accounting/invoices/:id. To read the payment, use GET accounting/payments/:id.","tags":["accountingInvoices"]}},"/accounting/products/{id}/product-lines/{productLineId}/pricing/{pricingId}":{"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"]},"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"]}},"/accounting/usages/ingestions":{"get":{"operationId":"getIngestionStatus","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getIngestionStatusOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: MULTIPLE_UPLOADS_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MULTIPLE_UPLOADS_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dataExtractionId":{"type":"number"},"matchCount":{"type":"number"}},"additionalProperties":false,"required":["dataExtractionId","matchCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MULTIPLE_UPLOADS_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dataExtractionId":{"type":"number"},"matchCount":{"type":"number"}},"additionalProperties":false,"required":["dataExtractionId","matchCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"dataExtractionId","in":"query","required":true,"schema":{"type":"number"},"description":"The identifier of the ingestion job to check, returned by POST accounting/usages/ingest."}],"summary":"Retrieve a usage ingestion's status","description":"Retrieves a usage ingestion job's status. Send the dataExtractionId that POST accounting/usages/ingest returned. The response has the outcome of each usage record in the job, in extractedData.","tags":["accountingUsages"]}},"/accounting/payments/{id}":{"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"]},"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"]}},"/accounting/amortization-schedule-lines":{"get":{"operationId":"amortizationScheduleLines","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (equality)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][ne]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (ne)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][gt]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (gt)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][gte]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (gte)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][lt]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (lt)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][lte]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (lte)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][in]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationScheduleHeaderId][notIn]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationScheduleHeaderId][between]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[amortizationScheduleHeaderId][like]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId]","in":"query","required":false,"description":"Filter scheduledPeriodId (equality)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][ne]","in":"query","required":false,"description":"Filter scheduledPeriodId (ne)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][gt]","in":"query","required":false,"description":"Filter scheduledPeriodId (gt)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][gte]","in":"query","required":false,"description":"Filter scheduledPeriodId (gte)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][lt]","in":"query","required":false,"description":"Filter scheduledPeriodId (lt)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][lte]","in":"query","required":false,"description":"Filter scheduledPeriodId (lte)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][in]","in":"query","required":false,"description":"Filter scheduledPeriodId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodId][notIn]","in":"query","required":false,"description":"Filter scheduledPeriodId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodId][between]","in":"query","required":false,"description":"Filter scheduledPeriodId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[scheduledPeriodId][like]","in":"query","required":false,"description":"Filter scheduledPeriodId (like)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodStartDate]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][ne]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][gt]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][gte]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][lt]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][lte]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][in]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodStartDate][notIn]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodStartDate][between]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[scheduledPeriodEndDate]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][ne]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][gt]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][gte]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][lt]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][lte]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][in]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodEndDate][notIn]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodEndDate][between]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[transactionCurrency]","in":"query","required":false,"description":"Filter transactionCurrency (equality)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][ne]","in":"query","required":false,"description":"Filter transactionCurrency (ne)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][gt]","in":"query","required":false,"description":"Filter transactionCurrency (gt)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][gte]","in":"query","required":false,"description":"Filter transactionCurrency (gte)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][lt]","in":"query","required":false,"description":"Filter transactionCurrency (lt)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][lte]","in":"query","required":false,"description":"Filter transactionCurrency (lte)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][in]","in":"query","required":false,"description":"Filter transactionCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionCurrency][notIn]","in":"query","required":false,"description":"Filter transactionCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionCurrency][between]","in":"query","required":false,"description":"Filter transactionCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[transactionCurrency][like]","in":"query","required":false,"description":"Filter transactionCurrency (like)","schema":{"type":"string"}},{"name":"filter[amortizationMethod]","in":"query","required":false,"description":"Filter amortizationMethod (equality)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][ne]","in":"query","required":false,"description":"Filter amortizationMethod (ne)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][gt]","in":"query","required":false,"description":"Filter amortizationMethod (gt)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][gte]","in":"query","required":false,"description":"Filter amortizationMethod (gte)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][lt]","in":"query","required":false,"description":"Filter amortizationMethod (lt)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][lte]","in":"query","required":false,"description":"Filter amortizationMethod (lte)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][in]","in":"query","required":false,"description":"Filter amortizationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationMethod][notIn]","in":"query","required":false,"description":"Filter amortizationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationMethod][between]","in":"query","required":false,"description":"Filter amortizationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[amortizationMethod][like]","in":"query","required":false,"description":"Filter amortizationMethod (like)","schema":{"type":"string"}},{"name":"filter[isJournalEntryPosted]","in":"query","required":false,"description":"Filter isJournalEntryPosted (equality)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][ne]","in":"query","required":false,"description":"Filter isJournalEntryPosted (ne)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][gt]","in":"query","required":false,"description":"Filter isJournalEntryPosted (gt)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][gte]","in":"query","required":false,"description":"Filter isJournalEntryPosted (gte)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][lt]","in":"query","required":false,"description":"Filter isJournalEntryPosted (lt)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][lte]","in":"query","required":false,"description":"Filter isJournalEntryPosted (lte)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][in]","in":"query","required":false,"description":"Filter isJournalEntryPosted (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isJournalEntryPosted][notIn]","in":"query","required":false,"description":"Filter isJournalEntryPosted (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isJournalEntryPosted][between]","in":"query","required":false,"description":"Filter isJournalEntryPosted (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isConfirmedZero]","in":"query","required":false,"description":"Filter isConfirmedZero (equality)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][ne]","in":"query","required":false,"description":"Filter isConfirmedZero (ne)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][gt]","in":"query","required":false,"description":"Filter isConfirmedZero (gt)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][gte]","in":"query","required":false,"description":"Filter isConfirmedZero (gte)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][lt]","in":"query","required":false,"description":"Filter isConfirmedZero (lt)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][lte]","in":"query","required":false,"description":"Filter isConfirmedZero (lte)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][in]","in":"query","required":false,"description":"Filter isConfirmedZero (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isConfirmedZero][notIn]","in":"query","required":false,"description":"Filter isConfirmedZero (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isConfirmedZero][between]","in":"query","required":false,"description":"Filter isConfirmedZero (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[outstanding]","in":"query","required":false,"description":"Filter outstanding (equality)","schema":{"type":"boolean"}},{"name":"filter[outstanding][ne]","in":"query","required":false,"description":"Filter outstanding (ne)","schema":{"type":"boolean"}},{"name":"filter[outstanding][gt]","in":"query","required":false,"description":"Filter outstanding (gt)","schema":{"type":"boolean"}},{"name":"filter[outstanding][gte]","in":"query","required":false,"description":"Filter outstanding (gte)","schema":{"type":"boolean"}},{"name":"filter[outstanding][lt]","in":"query","required":false,"description":"Filter outstanding (lt)","schema":{"type":"boolean"}},{"name":"filter[outstanding][lte]","in":"query","required":false,"description":"Filter outstanding (lte)","schema":{"type":"boolean"}},{"name":"filter[outstanding][in]","in":"query","required":false,"description":"Filter outstanding (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[outstanding][notIn]","in":"query","required":false,"description":"Filter outstanding (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[outstanding][between]","in":"query","required":false,"description":"Filter outstanding (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","scheduledPeriodStartDate","-scheduledPeriodStartDate","scheduledPeriodEndDate","-scheduledPeriodEndDate","amount","-amount","amortizationStartDate","-amortizationStartDate","amortizationEndDate","-amortizationEndDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","amortizationScheduleHeaderId","entityId","entityName","bookId","bookName","scheduledPeriodId","scheduledPeriodName","scheduledPeriodStartDate","scheduledPeriodEndDate","amount","transactionCurrency","amortizationMethod","amortizationStartDate","amortizationEndDate","isJournalEntryPosted","isConfirmedZero","outstanding","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/amortizationScheduleLinesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List amortization schedule lines","description":"Lists amortization schedule lines. Each line is one amortization schedule's amount for one accounting period.\n\nTo see what is still outstanding before you close a period, filter on outstanding=true for one entityId and one bookId.","tags":["accountingAmortizationScheduleLines"]}},"/banking/fund-transfers":{"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"]},"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"]}},"/accounting/subscriptions/{id}":{"get":{"operationId":"getSubscription","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSubscriptionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the subscription you want to retrieve."}],"summary":"Retrieve a subscription","description":"Retrieves a subscription. Use the subscription's id, not its subscriptionNumber.\n\nThe response includes the subscription's customer, legal entity, and lines. POST accounting/subscriptions/search returns the same fields for each subscription.","tags":["accountingSubscriptions"]}},"/banking/credit-card-entries":{"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, 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'."},"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":"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'."},"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":"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'."},"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":"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"]},"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"]}},"/accounting/revenue-scheduling-templates/search":{"post":{"operationId":"searchRevenueSchedulingTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchRevenueSchedulingTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchRevenueSchedulingTemplateInput"}}}},"summary":"Search revenue scheduling templates","description":"Searches revenue scheduling templates.","tags":["accountingRevenueSchedulingTemplates"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/invoice-frequency-templates":{"get":{"operationId":"invoiceFrequencyTemplates","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[isEvenInvoicing]","in":"query","required":false,"description":"Filter isEvenInvoicing (equality)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][ne]","in":"query","required":false,"description":"Filter isEvenInvoicing (ne)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][gt]","in":"query","required":false,"description":"Filter isEvenInvoicing (gt)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][gte]","in":"query","required":false,"description":"Filter isEvenInvoicing (gte)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][lt]","in":"query","required":false,"description":"Filter isEvenInvoicing (lt)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][lte]","in":"query","required":false,"description":"Filter isEvenInvoicing (lte)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][in]","in":"query","required":false,"description":"Filter isEvenInvoicing (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isEvenInvoicing][notIn]","in":"query","required":false,"description":"Filter isEvenInvoicing (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isEvenInvoicing][between]","in":"query","required":false,"description":"Filter isEvenInvoicing (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","isEvenInvoicing","-isEvenInvoicing","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","rule","isEvenInvoicing","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceFrequencyTemplatesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List invoice frequency templates","description":"Lists invoice frequency templates.","tags":["accountingInvoiceFrequencyTemplates"]}},"/accounting/debit-memos/search":{"post":{"operationId":"searchDebitMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchDebitMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: 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/searchDebitMemoInput"}}}},"summary":"Search debit memos","description":"Searches debit memos. Each debit memo in the results includes its lines.","tags":["accountingDebitMemos"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/refunds/search":{"post":{"operationId":"searchRefunds","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchRefundsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchRefundsInput"}}}},"summary":"Search refunds","description":"Searches refunds. A refund must match every filter you send. Unlike GET accounting/refunds, which takes one status, this endpoint takes several approval statuses at once and can filter by the refund's id.\n\nGET accounting/refunds and GET accounting/refunds/:id return the same fields for each refund.","tags":["accountingRefunds"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/invoice-runs/{id}/rerun":{"post":{"operationId":"rerunInvoiceRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rerunInvoiceRunOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"INVOICE_RUN_RERUN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"resolved":{"value":{"data":{"id":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91","status":"completed","invoicesCreated":2}},"summary":"The underlying cause was fixed, so the retry billed the held-back lines"},"stillFailing":{"value":{"data":{"id":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91","status":"error","invoicesCreated":0}},"summary":"The retry hit the same problem; the run keeps its failures and can be rerun again"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: RUN_NOT_FOUND, RUN_NOT_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RUN_NOT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_RERUN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RUN_NOT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_RERUN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RUN_NOT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_RERUN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice run you want to retry.","examples":{"resolved":{"value":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91"},"stillFailing":{"value":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rerunInvoiceRunInput"},"examples":{"resolved":{"value":{},"summary":"The underlying cause was fixed, so the retry billed the held-back lines"},"stillFailing":{"value":{},"summary":"The retry hit the same problem; the run keeps its failures and can be rerun again"}}}}},"summary":"Retry an invoice run's failed lines","description":"Retries the failed lines of an invoice run. The rerun selects the lines that failed in this run, removes their old errors, and tries to invoice them again. Only a run whose saved status is 'error' or 'completeAndError' can be rerun. A run that GET accounting/invoice-runs/:id reports as 'error' only because its job stopped fails with RUN_NOT_FAILED.\n\nStarting a new run doesn't retry these lines. A new run leaves out any line that already failed, so repeating POST accounting/invoice-runs after a failure invoices nothing.\n\nThe request returns once the rerun has finished, so you don't need to poll. A successful rerun sets the run's status to 'completed'. If a line fails again, the request fails with an error. Fix the cause, such as a missing tax code or an incomplete customer setup, and then send the rerun request again.","tags":["accountingInvoiceRuns"]}},"/accounting/revenue-contracts/{id}/approve":{"post":{"operationId":"approveRevenueContract","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveRevenueContractOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SALES_ORDER_NOT_APPROVED, NOT_APPROVABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"salesOrderApprovalStatus":{"type":"string","description":"Approval status the originating sales order is in — one of draft, pendingApproval or revise, or `unknown` when the contract has no reachable sales order at all."}},"additionalProperties":false,"required":["id","salesOrderApprovalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"reason":{"type":"string","description":"What made the contract unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"salesOrderApprovalStatus":{"type":"string","description":"Approval status the originating sales order is in — one of draft, pendingApproval or revise, or `unknown` when the contract has no reachable sales order at all."}},"additionalProperties":false,"required":["id","salesOrderApprovalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"reason":{"type":"string","description":"What made the contract unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"salesOrderApprovalStatus":{"type":"string","description":"Approval status the originating sales order is in — one of draft, pendingApproval or revise, or `unknown` when the contract has no reachable sales order at all."}},"additionalProperties":false,"required":["id","salesOrderApprovalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"reason":{"type":"string","description":"What made the contract unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the revenue contract to approve; bound from the :id path segment.","example":"7c41e9a2-58d6-4b03-9f17-2ae6c085d3b4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveRevenueContractInput"}}}},"summary":"Approve a revenue contract","description":"Approves a revenue contract.\n\n```\nPOST accounting/revenue-contracts/7c41e9a2-58d6-4b03-9f17-2ae6c085d3b4/approve\n```\n\n**The body is empty and so is the response.** Read the contract back with `GET accounting/revenue-contracts/{id}` to see its approved state.\n\nThis is the **first write route on revenue contracts** — until now the api could read them and nothing more, so a contract raised by an approved order could only be approved through the UI.\n\n**Approving a contract is what releases it for revenue recognition.** An approved contract's revenue plan lines become postable; an unapproved one recognises nothing. The call re-syncs the contract's business object and writes the activity trail on both the contract and the sales order it came from.\n\n**The sales order must be approved first.** A contract recognises revenue for the obligations its order fixes, so approving it ahead of the order is refused with `SALES_ORDER_NOT_APPROVED` and nothing is written. Approve the order with `POST accounting/sales-orders/{id}/approve`, then call this. Approving an order does **not** approve its contract — the two are deliberately separate calls.\n\n**Approving is idempotent.** A contract that is already approved returns success and changes nothing; the `REVENUE_CONTRACT_ALREADY_APPROVED` information diagnostic is how a caller tells that case from a fresh approval (`REVENUE_CONTRACT_APPROVED`), so a retry after a timeout is safe.\n\nApproving an id that does not exist is `NOT_FOUND`, not a silent success. The call runs in a transaction, so a failure part-way leaves the contract untouched.","tags":["accountingRevenueContracts"]}},"/accounting/journal-entries/{id}":{"patch":{"operationId":"updateJournalEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateJournalEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_REVERSAL_REASON, NOT_FOUND, REFERENCED_RECORD_NOT_FOUND, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the journal entry to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateJournalEntryInput"}}}},"summary":"Update a journal entry","description":"Updates a journal entry with the fields you send. A field you leave out keeps its current value. Lines change through three lists: createJournalEntryLines adds lines, updateJournalEntryLines changes lines by id, and deleteJournalEntryLines deletes lines.\n\nAn update sets the journal entry back to unposted and pending approval, including a journal entry that was posted. The journal entry is then approved at once if no approval policy applies, or if your approval completes the approvals the policy requires. Approval posts the journal entry to the general ledger, and no new journal entry is created.\n\nOnly a manual journal entry can be updated. The request fails if the journal entry is pending approval and has a pending reversal, if it has amortizations that have started, or if its accounting period is closed. A request an accounting rule rejects answers VALIDATION_FAILED, with the rule's message in reason and, where known, the rule's name in rule.","tags":["accountingJournalEntries"]},"get":{"operationId":"getJournalEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getJournalEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the journal entry to return."}],"summary":"Retrieve a journal entry","description":"Retrieves a journal entry.","tags":["accountingJournalEntries"]}},"/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,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[recruitmentId]","in":"query","required":false,"description":"Filter recruitmentId (equality)","schema":{"type":"string"}},{"name":"filter[recruitmentId][ne]","in":"query","required":false,"description":"Filter recruitmentId (ne)","schema":{"type":"string"}},{"name":"filter[recruitmentId][gt]","in":"query","required":false,"description":"Filter recruitmentId (gt)","schema":{"type":"string"}},{"name":"filter[recruitmentId][gte]","in":"query","required":false,"description":"Filter recruitmentId (gte)","schema":{"type":"string"}},{"name":"filter[recruitmentId][lt]","in":"query","required":false,"description":"Filter recruitmentId (lt)","schema":{"type":"string"}},{"name":"filter[recruitmentId][lte]","in":"query","required":false,"description":"Filter recruitmentId (lte)","schema":{"type":"string"}},{"name":"filter[recruitmentId][in]","in":"query","required":false,"description":"Filter recruitmentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recruitmentId][notIn]","in":"query","required":false,"description":"Filter recruitmentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recruitmentId][between]","in":"query","required":false,"description":"Filter recruitmentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[recruitmentId][like]","in":"query","required":false,"description":"Filter recruitmentId (like)","schema":{"type":"string"}},{"name":"filter[recruitmentName]","in":"query","required":false,"description":"Filter recruitmentName (equality)","schema":{"type":"string"}},{"name":"filter[recruitmentName][ne]","in":"query","required":false,"description":"Filter recruitmentName (ne)","schema":{"type":"string"}},{"name":"filter[recruitmentName][gt]","in":"query","required":false,"description":"Filter recruitmentName (gt)","schema":{"type":"string"}},{"name":"filter[recruitmentName][gte]","in":"query","required":false,"description":"Filter recruitmentName (gte)","schema":{"type":"string"}},{"name":"filter[recruitmentName][lt]","in":"query","required":false,"description":"Filter recruitmentName (lt)","schema":{"type":"string"}},{"name":"filter[recruitmentName][lte]","in":"query","required":false,"description":"Filter recruitmentName (lte)","schema":{"type":"string"}},{"name":"filter[recruitmentName][in]","in":"query","required":false,"description":"Filter recruitmentName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recruitmentName][notIn]","in":"query","required":false,"description":"Filter recruitmentName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recruitmentName][between]","in":"query","required":false,"description":"Filter recruitmentName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[recruitmentName][like]","in":"query","required":false,"description":"Filter recruitmentName (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[source]","in":"query","required":false,"description":"Filter source (equality)","schema":{"type":"string"}},{"name":"filter[source][ne]","in":"query","required":false,"description":"Filter source (ne)","schema":{"type":"string"}},{"name":"filter[source][gt]","in":"query","required":false,"description":"Filter source (gt)","schema":{"type":"string"}},{"name":"filter[source][gte]","in":"query","required":false,"description":"Filter source (gte)","schema":{"type":"string"}},{"name":"filter[source][lt]","in":"query","required":false,"description":"Filter source (lt)","schema":{"type":"string"}},{"name":"filter[source][lte]","in":"query","required":false,"description":"Filter source (lte)","schema":{"type":"string"}},{"name":"filter[source][in]","in":"query","required":false,"description":"Filter source (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[source][notIn]","in":"query","required":false,"description":"Filter source (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[source][between]","in":"query","required":false,"description":"Filter source (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[source][like]","in":"query","required":false,"description":"Filter source (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","applicantNumber","-applicantNumber","recruitmentName","-recruitmentName","status","-status","source","-source","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","applicantNumber","name","email","personId","recruitmentId","recruitmentName","positionName","status","source","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/applicationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List applications","description":"Lists applications. Create one with POST people/applications, or create a new applicant and their first application with POST people/applicants.","tags":["hrApplications"]},"post":{"operationId":"createApplication","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createApplicationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PERSON_NOT_FOUND, RECRUITMENT_NOT_FOUND, DUPLICATE_APPLICATION","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PERSON_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PERSON_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PERSON_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createApplicationInput"}}}},"summary":"Create an application","description":"Creates an application. An application links one person to one recruitment. The application's recruiter is the recruitment's owner.\n\nA person can't have a second application in status 'new' or 'inProcess' for the same recruitment.\n\nTo apply a person who doesn't exist yet, use POST people/applicants.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrApplications"]}},"/people/departments":{"get":{"operationId":"departments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[departmentNumber]","in":"query","required":false,"description":"Filter departmentNumber (equality)","schema":{"type":"string"}},{"name":"filter[departmentNumber][ne]","in":"query","required":false,"description":"Filter departmentNumber (ne)","schema":{"type":"string"}},{"name":"filter[departmentNumber][gt]","in":"query","required":false,"description":"Filter departmentNumber (gt)","schema":{"type":"string"}},{"name":"filter[departmentNumber][gte]","in":"query","required":false,"description":"Filter departmentNumber (gte)","schema":{"type":"string"}},{"name":"filter[departmentNumber][lt]","in":"query","required":false,"description":"Filter departmentNumber (lt)","schema":{"type":"string"}},{"name":"filter[departmentNumber][lte]","in":"query","required":false,"description":"Filter departmentNumber (lte)","schema":{"type":"string"}},{"name":"filter[departmentNumber][in]","in":"query","required":false,"description":"Filter departmentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentNumber][notIn]","in":"query","required":false,"description":"Filter departmentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentNumber][between]","in":"query","required":false,"description":"Filter departmentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentNumber][like]","in":"query","required":false,"description":"Filter departmentNumber (like)","schema":{"type":"string"}},{"name":"filter[departmentCode]","in":"query","required":false,"description":"Filter departmentCode (equality)","schema":{"type":"string"}},{"name":"filter[departmentCode][ne]","in":"query","required":false,"description":"Filter departmentCode (ne)","schema":{"type":"string"}},{"name":"filter[departmentCode][gt]","in":"query","required":false,"description":"Filter departmentCode (gt)","schema":{"type":"string"}},{"name":"filter[departmentCode][gte]","in":"query","required":false,"description":"Filter departmentCode (gte)","schema":{"type":"string"}},{"name":"filter[departmentCode][lt]","in":"query","required":false,"description":"Filter departmentCode (lt)","schema":{"type":"string"}},{"name":"filter[departmentCode][lte]","in":"query","required":false,"description":"Filter departmentCode (lte)","schema":{"type":"string"}},{"name":"filter[departmentCode][in]","in":"query","required":false,"description":"Filter departmentCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentCode][notIn]","in":"query","required":false,"description":"Filter departmentCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentCode][between]","in":"query","required":false,"description":"Filter departmentCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentCode][like]","in":"query","required":false,"description":"Filter departmentCode (like)","schema":{"type":"string"}},{"name":"filter[parentId]","in":"query","required":false,"description":"Filter parentId (equality)","schema":{"type":"string"}},{"name":"filter[parentId][ne]","in":"query","required":false,"description":"Filter parentId (ne)","schema":{"type":"string"}},{"name":"filter[parentId][gt]","in":"query","required":false,"description":"Filter parentId (gt)","schema":{"type":"string"}},{"name":"filter[parentId][gte]","in":"query","required":false,"description":"Filter parentId (gte)","schema":{"type":"string"}},{"name":"filter[parentId][lt]","in":"query","required":false,"description":"Filter parentId (lt)","schema":{"type":"string"}},{"name":"filter[parentId][lte]","in":"query","required":false,"description":"Filter parentId (lte)","schema":{"type":"string"}},{"name":"filter[parentId][in]","in":"query","required":false,"description":"Filter parentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][notIn]","in":"query","required":false,"description":"Filter parentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][between]","in":"query","required":false,"description":"Filter parentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentId][like]","in":"query","required":false,"description":"Filter parentId (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","departmentNumber","-departmentNumber","departmentCode","-departmentCode","name","-name","managerName","-managerName","status","-status","employeeCount","-employeeCount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","departmentNumber","departmentCode","parentId","name","description","managerName","status","employeeCount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/departmentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List departments","description":"Lists departments. GET people/departments/:id also returns managerId, parentName, startDate, endDate, and externalIdentifiers.","tags":["hrDepartments"]},"post":{"operationId":"createDepartment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createDepartmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: MANAGER_NOT_FOUND, PARENT_DEPARTMENT_NOT_FOUND, DUPLICATE_DEPARTMENT_CODE, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDepartmentInput"}}}},"summary":"Create a department","description":"Creates a department. The response contains only the new department's id. Read the full record with GET people/departments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrDepartments"]}},"/people/positions/{id}/assign-permissions":{"post":{"operationId":"assignPositionPermissions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/assignPositionPermissionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PERMISSIONS_NOT_PROVIDED, ROLES_NOT_FOUND, TASKS_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/assignPositionPermissionsInput"}}}},"summary":"Assign roles and tasks to a position","description":"Assigns roles and tasks to a position.","tags":["hrPositions"]}},"/people/teams":{"post":{"operationId":"createTeam","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTeamOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_TEAM_NAME, PARENT_TEAM_NOT_FOUND, INVALID_DATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_TEAM_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_TEAM_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_TEAM_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTeamInput"}}}},"summary":"Create a team","description":"Creates a team. The response contains only the new team's id. Read the full record with GET people/teams/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["peopleTeams"]},"get":{"operationId":"teams","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[teamType]","in":"query","required":false,"description":"Filter teamType (equality)","schema":{"type":"string"}},{"name":"filter[teamType][ne]","in":"query","required":false,"description":"Filter teamType (ne)","schema":{"type":"string"}},{"name":"filter[teamType][gt]","in":"query","required":false,"description":"Filter teamType (gt)","schema":{"type":"string"}},{"name":"filter[teamType][gte]","in":"query","required":false,"description":"Filter teamType (gte)","schema":{"type":"string"}},{"name":"filter[teamType][lt]","in":"query","required":false,"description":"Filter teamType (lt)","schema":{"type":"string"}},{"name":"filter[teamType][lte]","in":"query","required":false,"description":"Filter teamType (lte)","schema":{"type":"string"}},{"name":"filter[teamType][in]","in":"query","required":false,"description":"Filter teamType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamType][notIn]","in":"query","required":false,"description":"Filter teamType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamType][between]","in":"query","required":false,"description":"Filter teamType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[teamType][like]","in":"query","required":false,"description":"Filter teamType (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeCount]","in":"query","required":false,"description":"Filter employeeCount (equality)","schema":{"type":"number"}},{"name":"filter[employeeCount][ne]","in":"query","required":false,"description":"Filter employeeCount (ne)","schema":{"type":"number"}},{"name":"filter[employeeCount][gt]","in":"query","required":false,"description":"Filter employeeCount (gt)","schema":{"type":"number"}},{"name":"filter[employeeCount][gte]","in":"query","required":false,"description":"Filter employeeCount (gte)","schema":{"type":"number"}},{"name":"filter[employeeCount][lt]","in":"query","required":false,"description":"Filter employeeCount (lt)","schema":{"type":"number"}},{"name":"filter[employeeCount][lte]","in":"query","required":false,"description":"Filter employeeCount (lte)","schema":{"type":"number"}},{"name":"filter[employeeCount][in]","in":"query","required":false,"description":"Filter employeeCount (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeCount][notIn]","in":"query","required":false,"description":"Filter employeeCount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeCount][between]","in":"query","required":false,"description":"Filter employeeCount (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentId]","in":"query","required":false,"description":"Filter parentId (equality)","schema":{"type":"string"}},{"name":"filter[parentId][ne]","in":"query","required":false,"description":"Filter parentId (ne)","schema":{"type":"string"}},{"name":"filter[parentId][gt]","in":"query","required":false,"description":"Filter parentId (gt)","schema":{"type":"string"}},{"name":"filter[parentId][gte]","in":"query","required":false,"description":"Filter parentId (gte)","schema":{"type":"string"}},{"name":"filter[parentId][lt]","in":"query","required":false,"description":"Filter parentId (lt)","schema":{"type":"string"}},{"name":"filter[parentId][lte]","in":"query","required":false,"description":"Filter parentId (lte)","schema":{"type":"string"}},{"name":"filter[parentId][in]","in":"query","required":false,"description":"Filter parentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][notIn]","in":"query","required":false,"description":"Filter parentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][between]","in":"query","required":false,"description":"Filter parentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentId][like]","in":"query","required":false,"description":"Filter parentId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","teamNumber","-teamNumber","name","-name","teamType","-teamType","status","-status","startDate","-startDate","endDate","-endDate","employeeCount","-employeeCount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","teamNumber","name","teamType","status","startDate","endDate","employeeCount","parentId","parentName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/teamsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List teams","description":"Lists teams. To list one team's direct child teams, filter by parentId.","tags":["peopleTeams"]}},"/people/applicants":{"post":{"operationId":"createApplicant","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createApplicantOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: RECRUITMENT_NOT_FOUND, DUPLICATE_APPLICATION","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createApplicantInput"}}}},"summary":"Create an applicant","description":"Creates an applicant and their first application. The request creates a person and their first application to a recruitment together. If a person with the same email already exists, the request uses that person instead of creating a new one.\n\nThe application starts in status 'new'. The response contains only the new application's id.\n\nTo apply an existing person to another recruitment, use POST people/applications.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrApplicants"]}},"/people/absences":{"post":{"operationId":"createAbsence","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAbsenceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: EMPLOYEE_NOT_FOUND, ABSENCE_TYPE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAbsenceInput"}}}},"summary":"Create an absence","description":"Creates an absence. The response contains only the new absence's id. Read the record with GET people/absences/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrAbsences"]},"get":{"operationId":"absences","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[absenceTypeId]","in":"query","required":false,"description":"Filter absenceTypeId (equality)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][ne]","in":"query","required":false,"description":"Filter absenceTypeId (ne)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][gt]","in":"query","required":false,"description":"Filter absenceTypeId (gt)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][gte]","in":"query","required":false,"description":"Filter absenceTypeId (gte)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][lt]","in":"query","required":false,"description":"Filter absenceTypeId (lt)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][lte]","in":"query","required":false,"description":"Filter absenceTypeId (lte)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][in]","in":"query","required":false,"description":"Filter absenceTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[absenceTypeId][notIn]","in":"query","required":false,"description":"Filter absenceTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[absenceTypeId][between]","in":"query","required":false,"description":"Filter absenceTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[absenceTypeId][like]","in":"query","required":false,"description":"Filter absenceTypeId (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[days]","in":"query","required":false,"description":"Filter days (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][ne]","in":"query","required":false,"description":"Filter days (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][gt]","in":"query","required":false,"description":"Filter days (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][gte]","in":"query","required":false,"description":"Filter days (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][lt]","in":"query","required":false,"description":"Filter days (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][lte]","in":"query","required":false,"description":"Filter days (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][in]","in":"query","required":false,"description":"Filter days (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[days][notIn]","in":"query","required":false,"description":"Filter days (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[days][between]","in":"query","required":false,"description":"Filter days (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","leaveNumber","-leaveNumber","startDate","-startDate","endDate","-endDate","days","-days","status","-status"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","leaveNumber","employeeId","absenceTypeId","startDate","endDate","days","status","leaveDescription"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/absencesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List absences","description":"Lists absences. To filter by employee or by text in the description, use POST people/absences/search.","tags":["hrAbsences"]}},"/people/positions":{"post":{"operationId":"createPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: MANAGER_NOT_FOUND, JOB_PROFILE_NOT_FOUND, REGION_NOT_FOUND, DUPLICATE_POSITION","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPositionInput"}}}},"summary":"Create a position","description":"Creates a position. A position's name must be unique among positions with the same job profile. If you leave out jobProfileId, any position with the same name counts as a duplicate, and the request fails with DUPLICATE_POSITION.\n\nThe response contains only the new position's id. Read the full record with GET people/positions/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPositions"]},"get":{"operationId":"positions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[positionNumber]","in":"query","required":false,"description":"Filter positionNumber (equality)","schema":{"type":"string"}},{"name":"filter[positionNumber][ne]","in":"query","required":false,"description":"Filter positionNumber (ne)","schema":{"type":"string"}},{"name":"filter[positionNumber][gt]","in":"query","required":false,"description":"Filter positionNumber (gt)","schema":{"type":"string"}},{"name":"filter[positionNumber][gte]","in":"query","required":false,"description":"Filter positionNumber (gte)","schema":{"type":"string"}},{"name":"filter[positionNumber][lt]","in":"query","required":false,"description":"Filter positionNumber (lt)","schema":{"type":"string"}},{"name":"filter[positionNumber][lte]","in":"query","required":false,"description":"Filter positionNumber (lte)","schema":{"type":"string"}},{"name":"filter[positionNumber][in]","in":"query","required":false,"description":"Filter positionNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionNumber][notIn]","in":"query","required":false,"description":"Filter positionNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionNumber][between]","in":"query","required":false,"description":"Filter positionNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[positionNumber][like]","in":"query","required":false,"description":"Filter positionNumber (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[overtimeStatus]","in":"query","required":false,"description":"Filter overtimeStatus (equality)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][ne]","in":"query","required":false,"description":"Filter overtimeStatus (ne)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][gt]","in":"query","required":false,"description":"Filter overtimeStatus (gt)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][gte]","in":"query","required":false,"description":"Filter overtimeStatus (gte)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][lt]","in":"query","required":false,"description":"Filter overtimeStatus (lt)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][lte]","in":"query","required":false,"description":"Filter overtimeStatus (lte)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][in]","in":"query","required":false,"description":"Filter overtimeStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[overtimeStatus][notIn]","in":"query","required":false,"description":"Filter overtimeStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[overtimeStatus][between]","in":"query","required":false,"description":"Filter overtimeStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[overtimeStatus][like]","in":"query","required":false,"description":"Filter overtimeStatus (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[timelineStatus]","in":"query","required":false,"description":"Filter timelineStatus (equality)","schema":{"type":"string"}},{"name":"filter[timelineStatus][ne]","in":"query","required":false,"description":"Filter timelineStatus (ne)","schema":{"type":"string"}},{"name":"filter[timelineStatus][gt]","in":"query","required":false,"description":"Filter timelineStatus (gt)","schema":{"type":"string"}},{"name":"filter[timelineStatus][gte]","in":"query","required":false,"description":"Filter timelineStatus (gte)","schema":{"type":"string"}},{"name":"filter[timelineStatus][lt]","in":"query","required":false,"description":"Filter timelineStatus (lt)","schema":{"type":"string"}},{"name":"filter[timelineStatus][lte]","in":"query","required":false,"description":"Filter timelineStatus (lte)","schema":{"type":"string"}},{"name":"filter[timelineStatus][in]","in":"query","required":false,"description":"Filter timelineStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[timelineStatus][notIn]","in":"query","required":false,"description":"Filter timelineStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[timelineStatus][between]","in":"query","required":false,"description":"Filter timelineStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[timelineStatus][like]","in":"query","required":false,"description":"Filter timelineStatus (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","positionNumber","-positionNumber","name","-name","hiringManagerName","-hiringManagerName","desiredHeadcount","-desiredHeadcount","employeeCount","-employeeCount","status","-status","timelineStatus","-timelineStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","positionNumber","name","description","desiredHeadcount","employeeCount","expectedSalary","hiringManagerName","overtimeStatus","status","timelineStatus","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/positionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List positions","description":"Lists positions. The list doesn't include each position's start and end dates or its hiring manager, job profile, and region identifiers. GET people/positions/:id returns those, with the job profile and region names.","tags":["hrPositions"]}},"/people/absences/approve":{"post":{"operationId":"approveAbsences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveAbsencesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_APPROVAL_POLICY, NOT_FOUND, EMPLOYEE_NOT_FOUND, ALREADY_DECIDED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveAbsencesInput"}}}},"summary":"Approve absence requests","description":"Approves one or more absence requests. Each absence must have status 'requested'. Unless you are an HR admin, each absence must also match an absence approval policy, you must be one of its approvers or the employee's direct manager, and it may not be your own absence. If any absence can't be approved, none are.\n\nThe response lists the approved absences' ids in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrAbsences"]}},"/people/departments/{id}":{"get":{"operationId":"getDepartment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDepartmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the department you want to retrieve."}],"summary":"Retrieve a department","description":"Retrieves a department. Use the department's id, not its departmentNumber.","tags":["hrDepartments"]},"patch":{"operationId":"updateDepartment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateDepartmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, MANAGER_NOT_FOUND, PARENT_DEPARTMENT_NOT_FOUND, DUPLICATE_DEPARTMENT_CODE, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the department you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateDepartmentInput"}}}},"summary":"Update a department","description":"Updates a department with the fields you send. A field you leave out keeps its current value.\n\nUse the department's id, not its departmentNumber.\n\nYou don't send external identifiers as a whole list. Add, change, and remove them with createExternalIdentifiers, updateExternalIdentifiers, and deleteExternalIdentifiers.\n\nThe response is empty. Read the updated department with GET people/departments/:id.","tags":["hrDepartments"]}},"/people/person/search":{"post":{"operationId":"searchPeople","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPeopleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPeopleInput"}}}},"summary":"Search people","description":"Searches people.","tags":["hrPeople"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/person":{"post":{"operationId":"createPerson","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPersonOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ENTITY_NOT_FOUND, DEPARTMENT_NOT_FOUND, POSITION_NOT_FOUND, MANAGER_NOT_FOUND, HOLIDAY_CALENDAR_NOT_FOUND, HOLIDAY_CALENDAR_REQUIRED, ABSENCE_POLICY_NOT_FOUND, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["absencePolicyIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["absencePolicyIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["absencePolicyIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPersonInput"}}}},"summary":"Create a person","description":"Creates a person. The response contains only the new person's id. Read the full record with GET people/person/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPeople"]},"get":{"operationId":"people","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[employmentCategory]","in":"query","required":false,"description":"Filter employmentCategory (equality)","schema":{"type":"string"}},{"name":"filter[employmentCategory][ne]","in":"query","required":false,"description":"Filter employmentCategory (ne)","schema":{"type":"string"}},{"name":"filter[employmentCategory][gt]","in":"query","required":false,"description":"Filter employmentCategory (gt)","schema":{"type":"string"}},{"name":"filter[employmentCategory][gte]","in":"query","required":false,"description":"Filter employmentCategory (gte)","schema":{"type":"string"}},{"name":"filter[employmentCategory][lt]","in":"query","required":false,"description":"Filter employmentCategory (lt)","schema":{"type":"string"}},{"name":"filter[employmentCategory][lte]","in":"query","required":false,"description":"Filter employmentCategory (lte)","schema":{"type":"string"}},{"name":"filter[employmentCategory][in]","in":"query","required":false,"description":"Filter employmentCategory (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employmentCategory][notIn]","in":"query","required":false,"description":"Filter employmentCategory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employmentCategory][between]","in":"query","required":false,"description":"Filter employmentCategory (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employmentCategory][like]","in":"query","required":false,"description":"Filter employmentCategory (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","employeeNumber","-employeeNumber","status","-status","employmentCategory","-employmentCategory","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","employeeNumber","firstName","lastName","name","displayName","email","status","employmentCategory","weeklyWorkingHours","entityId","entityName","locationName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/peopleRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List people","description":"Lists people. GET people/person/:id returns a richer record, including compensation and external identifiers.\n\nTo filter by name, email, employeeNumber, or external identifier, use POST people/person/search.","tags":["hrPeople"]}},"/people/person/{id}":{"patch":{"operationId":"updatePerson","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePersonOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the person you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePersonInput"}}}},"summary":"Update a person","description":"Updates a person with the fields you send. A field you leave out keeps its current value. External identifiers aren't replaced as a list: add, change, and remove them with createExternalIdentifiers, updateExternalIdentifiers, and deleteExternalIdentifiers.\n\nUse the person's id, not their employeeNumber.\n\nThe job assignment, employment status, and compensation can't be changed with this endpoint. The response is empty. Read the updated person with GET people/person/:id.","tags":["hrPeople"]},"get":{"operationId":"getPerson","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPersonOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the person you want to retrieve."}],"summary":"Retrieve a person","description":"Retrieves a person. Use the person's id, not their employeeNumber.","tags":["hrPeople"]}},"/people/documents/{id}/download":{"get":{"operationId":"downloadDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/downloadDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, FILE_UNAVAILABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the document you want to download."}],"summary":"Retrieve a document's download link","description":"Retrieves a download link for a document. The response contains a short-lived link, not the file itself. Request a new link each time you start a download instead of saving the link.","tags":["hrDocuments"]}},"/people/positions/{id}":{"patch":{"operationId":"updatePosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, MANAGER_NOT_FOUND, JOB_PROFILE_NOT_FOUND, REGION_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePositionInput"}}}},"summary":"Update a position","description":"Updates a position with the fields you send. A field you leave out keeps its current value.\n\nUse the position's id, not its positionNumber.\n\nUnlike POST people/positions, an update does not check that the name and job profile combination is unique.","tags":["hrPositions"]},"get":{"operationId":"getPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position you want to retrieve."}],"summary":"Retrieve a position","description":"Retrieves a position. Use the position's id, not its positionNumber.","tags":["hrPositions"]}},"/people/absences/search":{"post":{"operationId":"searchAbsences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAbsencesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAbsencesInput"}}}},"summary":"Search absences","description":"Searches absences.","tags":["hrAbsences"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/absences/{id}":{"patch":{"operationId":"updateAbsence","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAbsenceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ABSENCE_TYPE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the absence you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAbsenceInput"}}}},"summary":"Update an absence","description":"Updates an absence with the fields you send. A field you leave out keeps its current value, except in two cases.\n\nUse the absence's id, not its leaveNumber.\n\nSick certificates: if editReason contains the text 'sick certificate', only leaveCertificate and certificateName are saved, and everything else in the request is ignored.\n\nStatus: any other update recalculates the status, so editing an approved absence can send it back to 'requested' and restart the approval workflow.\n\nThe response is empty. Read the absence back with GET people/absences/:id.","tags":["hrAbsences"]},"get":{"operationId":"getAbsence","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAbsenceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the absence you want to retrieve."}],"summary":"Retrieve an absence","description":"Retrieves an absence. Use the absence's id, not its leaveNumber.","tags":["hrAbsences"]},"delete":{"operationId":"deleteAbsence","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAbsenceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the absence you want to delete."}],"summary":"Delete or cancel an absence","description":"Deletes or cancels an absence. Deleting does not always remove the absence. An absence with status 'requested' is removed.\n\nAny other approved or rejected absence is canceled instead: its status changes to 'canceled' and the absence is kept. An absence that is already canceled stays as it is.\n\nAn absence created from a mandatory absence, which the company assigns to employees, can be deleted only by an HR administrator who is not its employee, and is then removed whatever its status. Unless you are an HR administrator or the employee's manager, you can't delete an approved absence that has already started.\n\nWhen the request succeeds, it returns the id whether the absence was removed, canceled, or left as it was. To see what happened, read the absence with GET people/absences/:id.","tags":["hrAbsences"]}},"/people/recruitments":{"get":{"operationId":"recruitments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[published]","in":"query","required":false,"description":"Filter published (equality)","schema":{"type":"boolean"}},{"name":"filter[published][ne]","in":"query","required":false,"description":"Filter published (ne)","schema":{"type":"boolean"}},{"name":"filter[published][gt]","in":"query","required":false,"description":"Filter published (gt)","schema":{"type":"boolean"}},{"name":"filter[published][gte]","in":"query","required":false,"description":"Filter published (gte)","schema":{"type":"boolean"}},{"name":"filter[published][lt]","in":"query","required":false,"description":"Filter published (lt)","schema":{"type":"boolean"}},{"name":"filter[published][lte]","in":"query","required":false,"description":"Filter published (lte)","schema":{"type":"boolean"}},{"name":"filter[published][in]","in":"query","required":false,"description":"Filter published (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[published][notIn]","in":"query","required":false,"description":"Filter published (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[published][between]","in":"query","required":false,"description":"Filter published (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unsolicited]","in":"query","required":false,"description":"Filter unsolicited (equality)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][ne]","in":"query","required":false,"description":"Filter unsolicited (ne)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][gt]","in":"query","required":false,"description":"Filter unsolicited (gt)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][gte]","in":"query","required":false,"description":"Filter unsolicited (gte)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][lt]","in":"query","required":false,"description":"Filter unsolicited (lt)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][lte]","in":"query","required":false,"description":"Filter unsolicited (lte)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][in]","in":"query","required":false,"description":"Filter unsolicited (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unsolicited][notIn]","in":"query","required":false,"description":"Filter unsolicited (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unsolicited][between]","in":"query","required":false,"description":"Filter unsolicited (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deadline]","in":"query","required":false,"description":"Filter deadline (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][ne]","in":"query","required":false,"description":"Filter deadline (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][gt]","in":"query","required":false,"description":"Filter deadline (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][gte]","in":"query","required":false,"description":"Filter deadline (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][lt]","in":"query","required":false,"description":"Filter deadline (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][lte]","in":"query","required":false,"description":"Filter deadline (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][in]","in":"query","required":false,"description":"Filter deadline (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deadline][notIn]","in":"query","required":false,"description":"Filter deadline (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deadline][between]","in":"query","required":false,"description":"Filter deadline (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vacancies]","in":"query","required":false,"description":"Filter vacancies (equality)","schema":{"type":"number"}},{"name":"filter[vacancies][ne]","in":"query","required":false,"description":"Filter vacancies (ne)","schema":{"type":"number"}},{"name":"filter[vacancies][gt]","in":"query","required":false,"description":"Filter vacancies (gt)","schema":{"type":"number"}},{"name":"filter[vacancies][gte]","in":"query","required":false,"description":"Filter vacancies (gte)","schema":{"type":"number"}},{"name":"filter[vacancies][lt]","in":"query","required":false,"description":"Filter vacancies (lt)","schema":{"type":"number"}},{"name":"filter[vacancies][lte]","in":"query","required":false,"description":"Filter vacancies (lte)","schema":{"type":"number"}},{"name":"filter[vacancies][in]","in":"query","required":false,"description":"Filter vacancies (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vacancies][notIn]","in":"query","required":false,"description":"Filter vacancies (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vacancies][between]","in":"query","required":false,"description":"Filter vacancies (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId]","in":"query","required":false,"description":"Filter departmentId (equality)","schema":{"type":"string"}},{"name":"filter[departmentId][ne]","in":"query","required":false,"description":"Filter departmentId (ne)","schema":{"type":"string"}},{"name":"filter[departmentId][gt]","in":"query","required":false,"description":"Filter departmentId (gt)","schema":{"type":"string"}},{"name":"filter[departmentId][gte]","in":"query","required":false,"description":"Filter departmentId (gte)","schema":{"type":"string"}},{"name":"filter[departmentId][lt]","in":"query","required":false,"description":"Filter departmentId (lt)","schema":{"type":"string"}},{"name":"filter[departmentId][lte]","in":"query","required":false,"description":"Filter departmentId (lte)","schema":{"type":"string"}},{"name":"filter[departmentId][in]","in":"query","required":false,"description":"Filter departmentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][notIn]","in":"query","required":false,"description":"Filter departmentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][between]","in":"query","required":false,"description":"Filter departmentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId][like]","in":"query","required":false,"description":"Filter departmentId (like)","schema":{"type":"string"}},{"name":"filter[positionId]","in":"query","required":false,"description":"Filter positionId (equality)","schema":{"type":"string"}},{"name":"filter[positionId][ne]","in":"query","required":false,"description":"Filter positionId (ne)","schema":{"type":"string"}},{"name":"filter[positionId][gt]","in":"query","required":false,"description":"Filter positionId (gt)","schema":{"type":"string"}},{"name":"filter[positionId][gte]","in":"query","required":false,"description":"Filter positionId (gte)","schema":{"type":"string"}},{"name":"filter[positionId][lt]","in":"query","required":false,"description":"Filter positionId (lt)","schema":{"type":"string"}},{"name":"filter[positionId][lte]","in":"query","required":false,"description":"Filter positionId (lte)","schema":{"type":"string"}},{"name":"filter[positionId][in]","in":"query","required":false,"description":"Filter positionId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionId][notIn]","in":"query","required":false,"description":"Filter positionId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionId][between]","in":"query","required":false,"description":"Filter positionId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[positionId][like]","in":"query","required":false,"description":"Filter positionId (like)","schema":{"type":"string"}},{"name":"filter[teamId]","in":"query","required":false,"description":"Filter teamId (equality)","schema":{"type":"string"}},{"name":"filter[teamId][ne]","in":"query","required":false,"description":"Filter teamId (ne)","schema":{"type":"string"}},{"name":"filter[teamId][gt]","in":"query","required":false,"description":"Filter teamId (gt)","schema":{"type":"string"}},{"name":"filter[teamId][gte]","in":"query","required":false,"description":"Filter teamId (gte)","schema":{"type":"string"}},{"name":"filter[teamId][lt]","in":"query","required":false,"description":"Filter teamId (lt)","schema":{"type":"string"}},{"name":"filter[teamId][lte]","in":"query","required":false,"description":"Filter teamId (lte)","schema":{"type":"string"}},{"name":"filter[teamId][in]","in":"query","required":false,"description":"Filter teamId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamId][notIn]","in":"query","required":false,"description":"Filter teamId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamId][between]","in":"query","required":false,"description":"Filter teamId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[teamId][like]","in":"query","required":false,"description":"Filter teamId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId]","in":"query","required":false,"description":"Filter employmentCategoryId (equality)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][ne]","in":"query","required":false,"description":"Filter employmentCategoryId (ne)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][gt]","in":"query","required":false,"description":"Filter employmentCategoryId (gt)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][gte]","in":"query","required":false,"description":"Filter employmentCategoryId (gte)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][lt]","in":"query","required":false,"description":"Filter employmentCategoryId (lt)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][lte]","in":"query","required":false,"description":"Filter employmentCategoryId (lte)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][in]","in":"query","required":false,"description":"Filter employmentCategoryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employmentCategoryId][notIn]","in":"query","required":false,"description":"Filter employmentCategoryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employmentCategoryId][between]","in":"query","required":false,"description":"Filter employmentCategoryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employmentCategoryId][like]","in":"query","required":false,"description":"Filter employmentCategoryId (like)","schema":{"type":"string"}},{"name":"filter[hiringManagerId]","in":"query","required":false,"description":"Filter hiringManagerId (equality)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][ne]","in":"query","required":false,"description":"Filter hiringManagerId (ne)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][gt]","in":"query","required":false,"description":"Filter hiringManagerId (gt)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][gte]","in":"query","required":false,"description":"Filter hiringManagerId (gte)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][lt]","in":"query","required":false,"description":"Filter hiringManagerId (lt)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][lte]","in":"query","required":false,"description":"Filter hiringManagerId (lte)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][in]","in":"query","required":false,"description":"Filter hiringManagerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hiringManagerId][notIn]","in":"query","required":false,"description":"Filter hiringManagerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hiringManagerId][between]","in":"query","required":false,"description":"Filter hiringManagerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hiringManagerId][like]","in":"query","required":false,"description":"Filter hiringManagerId (like)","schema":{"type":"string"}},{"name":"filter[ownerId]","in":"query","required":false,"description":"Filter ownerId (equality)","schema":{"type":"string"}},{"name":"filter[ownerId][ne]","in":"query","required":false,"description":"Filter ownerId (ne)","schema":{"type":"string"}},{"name":"filter[ownerId][gt]","in":"query","required":false,"description":"Filter ownerId (gt)","schema":{"type":"string"}},{"name":"filter[ownerId][gte]","in":"query","required":false,"description":"Filter ownerId (gte)","schema":{"type":"string"}},{"name":"filter[ownerId][lt]","in":"query","required":false,"description":"Filter ownerId (lt)","schema":{"type":"string"}},{"name":"filter[ownerId][lte]","in":"query","required":false,"description":"Filter ownerId (lte)","schema":{"type":"string"}},{"name":"filter[ownerId][in]","in":"query","required":false,"description":"Filter ownerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[ownerId][notIn]","in":"query","required":false,"description":"Filter ownerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[ownerId][between]","in":"query","required":false,"description":"Filter ownerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[ownerId][like]","in":"query","required":false,"description":"Filter ownerId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","recruitmentNumber","-recruitmentNumber","name","-name","category","-category","status","-status","published","-published","unsolicited","-unsolicited","deadline","-deadline","vacancies","-vacancies","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","recruitmentNumber","name","category","status","published","unsolicited","deadline","vacancies","departmentId","departmentName","positionId","positionName","teamId","teamName","locationId","locationName","entityId","entityName","employmentCategoryId","hiringManagerId","hiringManagerName","ownerId","ownerName","jobDescription","viabilityCriteria","website","relocationRequired","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/recruitmentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List recruitments","description":"Lists recruitments.","tags":["peopleRecruitments"]},"post":{"operationId":"createRecruitment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createRecruitmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DEPARTMENT_OR_POSITION_REQUIRED, REFERENCE_NOT_FOUND, INVALID_DEADLINE, INVALID_VACANCIES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DEPARTMENT_OR_POSITION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DEPARTMENT_OR_POSITION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DEPARTMENT_OR_POSITION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createRecruitmentInput"}}}},"summary":"Create a recruitment","description":"Creates a recruitment. You must name a department, a position, or both. If you leave out name, the recruitment takes the department's name, or the position's name when there is no department.\n\nThe hiring manager and the owner each get a permission role so they can work on the opening.\n\nThe response contains only the new recruitment's id. Read the full record with GET people/recruitments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["peopleRecruitments"]}},"/people/documents/{id}":{"delete":{"operationId":"deleteDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the document you want to delete."}],"summary":"Delete a document","description":"Deletes a document. Only the document record is removed. The uploaded file is kept.\n\nYou may delete your own documents and, if you manage people, your direct reports'; an HR admin may delete any. An approved document cannot be deleted by its owner, only by their direct manager or an HR admin. A document outside your reach fails with NOT_FOUND, like a missing one.\n\nA second delete request for the same document fails with NOT_FOUND.","tags":["hrDocuments"]}},"/people/absences/reject":{"post":{"operationId":"rejectAbsences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectAbsencesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_APPROVAL_POLICY, NOT_FOUND, EMPLOYEE_NOT_FOUND, ALREADY_DECIDED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectAbsencesInput"}}}},"summary":"Reject absence requests","description":"Rejects one or more absence requests. Each absence must have status 'requested'. Unless you are an HR admin, each absence must also match an absence approval policy, you must be one of its approvers or the employee's direct manager, and it may not be your own absence. If any absence can't be rejected, none are.\n\nThe response lists the rejected absences' ids in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrAbsences"]}},"/people/recruitments/{id}":{"get":{"operationId":"getRecruitment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getRecruitmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the recruitment you want to retrieve."}],"summary":"Retrieve a recruitment","description":"Retrieves a recruitment. Use the recruitment's id, not its recruitmentNumber.","tags":["peopleRecruitments"]},"patch":{"operationId":"updateRecruitment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateRecruitmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_DEADLINE, INVALID_VACANCIES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the recruitment you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateRecruitmentInput"}}}},"summary":"Update a recruitment","description":"Updates a recruitment with the fields you send. A field you leave out keeps its current value.\n\nUse the recruitment's id, not its recruitmentNumber.\n\nA new hiring manager or owner also gets the permissions to work on the opening.\n\nThe response is empty. Read the updated recruitment with GET people/recruitments/:id.","tags":["peopleRecruitments"]}},"/people/positions/{id}/remove-permissions":{"post":{"operationId":"removePositionPermissions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/removePositionPermissionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PERMISSIONS_NOT_PROVIDED, ROLES_NOT_FOUND, TASKS_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/removePositionPermissionsInput"}}}},"summary":"Remove roles and tasks from a position","description":"Removes roles and tasks from a position.","tags":["hrPositions"]}},"/people/absence-types/{id}":{"get":{"operationId":"getAbsenceType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAbsenceTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the absence type you want to retrieve."}],"summary":"Retrieve an absence type","description":"Retrieves an absence type.","tags":["hrAbsenceTypes"]}},"/people/absence-types":{"get":{"operationId":"absenceTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","category","-category"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","category","description"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/absenceTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List absence types","description":"Lists absence types.","tags":["hrAbsenceTypes"]}},"/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"]}},"/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"]}},"/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","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, 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":"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":"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":"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"]}},"/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"}]}},"/inventory/unit-of-measure-groups/bulk":{"post":{"operationId":"bulkCreateUnitOfMeasureGroups","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateUnitOfMeasureGroupsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"seedingConversionTables":{"value":{"data":{"created":[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"},{"id":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"}]}},"summary":"Two groups created together, the first with a conversion line and the second with only its base unit"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: UNIT_NOT_FOUND, DUPLICATE_UNIT_IN_GROUP, INVALID_CONVERSION_FACTOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateUnitOfMeasureGroupsInput"},"examples":{"seedingConversionTables":{"value":{"unitOfMeasureGroups":[{"name":"Packaging","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","lines":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"12.00"}]},{"name":"Weight","baseUnitOfMeasureId":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b"}]},"summary":"Two groups created together, the first with a conversion line and the second with only its base unit"}}}}},"summary":"Bulk create unit of measure groups","description":"Creates multiple unit of measure groups in one request. Each group in the request takes the same fields as the body of POST inventory/unit-of-measure-groups, including its conversion lines.\n\nIf any group can't be created, none are, and the error gives that group's position in the request.\n\nThe response lists the created groups in the order you sent them, each with only its id. To see the ids assigned to their lines, use GET inventory/unit-of-measure-groups/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasureGroups"]}},"/inventory/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"]}},"/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","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"]}},"/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"]}},"/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"]}},"/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"]}},"/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"}]}},"/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"]}},"/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"]}},"/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","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"}]}},"/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"]}},"/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"}]}},"/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"]}},"/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"]}},"/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"]}},"/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"]}},"/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, 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":"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":"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":"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"]}},"/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"]}},"/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"]}},"/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"]}},"/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"}]}},"/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"]}},"/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"]}},"/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"]}},"/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"]}},"/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"}]}},"/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/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/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","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, 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":"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":"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":"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.\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. On approval the current term ends on that date: its un-invoiced overlap is billed and its invoiced overlap is credited.\n\nTo cancel the whole subscription, use POST accounting/subscriptions/:id/cancel.","tags":["accountingSubscriptions"]}},"/accounting/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/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/invoice-runs/{id}":{"get":{"operationId":"getInvoiceRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInvoiceRunOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"settledClean":{"value":{"data":{"data":{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completed","invoicesCreated":1,"startedAt":"2026-09-30T08:14:22.000Z","finishedAt":"2026-09-30T08:14:41.000Z","scope":["all"],"invoices":[{"id":"a2c5e881-4f37-4b09-9d16-8e3b0c7a5d24","invoiceNumber":"INV-20841","totalAmount":"1210.00","currency":"EUR"}],"errors":[]}}},"summary":"A run that billed everything it selected"},"stillRunning":{"value":{"data":{"data":{"id":"5e2a9c81-7f43-4b60-8d19-3c6b0a4e8f52","invoiceRunNumber":"ISR-1044","status":"running","invoicesCreated":0,"startedAt":"2026-09-30T08:20:01.000Z","scope":["oneTimeAndRecurring"],"progress":{"title":"Creating invoices","progress":18,"total":64},"invoices":[],"errors":[]}}},"summary":"A run still working, with its own progress reporting"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice run you want to retrieve.","examples":{"settledClean":{"value":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15"},"stillRunning":{"value":"5e2a9c81-7f43-4b60-8d19-3c6b0a4e8f52"}}}],"summary":"Retrieve an invoice run","description":"Retrieves an invoice run. Use the invoice run's id, not its invoiceRunNumber.\n\nThe response shows what the run covered, its status, the invoices it created and the lines that failed.\n\n'completed' means every selected line was invoiced. 'error' means the run failed, and 'errors' lists the lines that failed. Check 'status' rather than 'invoicesCreated', because a 'completeAndError' run has created invoices and also has failed lines.\n\nIf the run's job stops without finishing, for example because it was canceled or lost, this endpoint reports 'error'. The saved status stays 'running', and GET accounting/invoice-runs returns that saved status.\n\nTo start a run, use POST accounting/invoice-runs.","tags":["accountingInvoiceRuns"]}},"/accounting/journal-entries/search":{"post":{"operationId":"searchJournalEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchJournalEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchJournalEntriesInput"}}}},"summary":"Search journal entries","description":"Searches journal entries. Each journal entry in the response includes its lines.","tags":["accountingJournalEntries"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/chart-of-accounts":{"get":{"operationId":"chartsOfAccounts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[accountNumbering]","in":"query","required":false,"description":"Filter accountNumbering (equality)","schema":{"type":"string"}},{"name":"filter[accountNumbering][ne]","in":"query","required":false,"description":"Filter accountNumbering (ne)","schema":{"type":"string"}},{"name":"filter[accountNumbering][gt]","in":"query","required":false,"description":"Filter accountNumbering (gt)","schema":{"type":"string"}},{"name":"filter[accountNumbering][gte]","in":"query","required":false,"description":"Filter accountNumbering (gte)","schema":{"type":"string"}},{"name":"filter[accountNumbering][lt]","in":"query","required":false,"description":"Filter accountNumbering (lt)","schema":{"type":"string"}},{"name":"filter[accountNumbering][lte]","in":"query","required":false,"description":"Filter accountNumbering (lte)","schema":{"type":"string"}},{"name":"filter[accountNumbering][in]","in":"query","required":false,"description":"Filter accountNumbering (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumbering][notIn]","in":"query","required":false,"description":"Filter accountNumbering (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumbering][between]","in":"query","required":false,"description":"Filter accountNumbering (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountNumbering][like]","in":"query","required":false,"description":"Filter accountNumbering (like)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits]","in":"query","required":false,"description":"Filter accountNumberingDigits (equality)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][ne]","in":"query","required":false,"description":"Filter accountNumberingDigits (ne)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][gt]","in":"query","required":false,"description":"Filter accountNumberingDigits (gt)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][gte]","in":"query","required":false,"description":"Filter accountNumberingDigits (gte)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][lt]","in":"query","required":false,"description":"Filter accountNumberingDigits (lt)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][lte]","in":"query","required":false,"description":"Filter accountNumberingDigits (lte)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][in]","in":"query","required":false,"description":"Filter accountNumberingDigits (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumberingDigits][notIn]","in":"query","required":false,"description":"Filter accountNumberingDigits (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumberingDigits][between]","in":"query","required":false,"description":"Filter accountNumberingDigits (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountNumberingDigits][like]","in":"query","required":false,"description":"Filter accountNumberingDigits (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","accountNumbering","-accountNumbering","accountNumberingDigits","-accountNumberingDigits","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","accountNumbering","accountNumberingDigits","description","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/chartsOfAccountsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List charts of accounts","description":"Lists charts of accounts. By default, the list is ordered by name. To match on name or description, use POST accounting/chart-of-accounts/search.","tags":["accountingChartsOfAccounts"]}},"/accounting/usages/search":{"post":{"operationId":"searchUsage","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchUsageOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE_FILTER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchUsageInput"}}}},"summary":"Search usage records","description":"Searches usage records.","tags":["accountingUsages"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/banking/bank-entries/{id}/void":{"post":{"operationId":"voidBankEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidBankEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VOID_REASON_REQUIRED, BANK_ENTRY_ALREADY_VOIDED, POSTING_PERIOD_NOT_OPEN, MISSING_POSTING_CONTEXT, VOID_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank entry you want to void.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidBankEntryInput"}}}},"summary":"Void a bank entry","description":"Voids a bank entry. Voiding also voids the bank entry's journal entry in the general ledger. No reversing journal entry is created, and voiding can't be undone.\n\nThe bank entry, its number, and the audit trail stay. Its lines and attachments don't change. There is no endpoint to delete a bank entry.\n\nThe journal entries of the bank entry's amortization schedules are voided too. A pending approval on the journal entry becomes rejected, and bank transactions matched to the bank entry are unmatched.\n\nvoidReason is saved on the bank entry and in the audit trail. No read endpoint returns voidReason.\n\nThe response is empty. Read the result with GET banking/bank-entries/:id.","tags":["bankingBankEntries"]}},"/accounting/product-lines":{"get":{"operationId":"productLines","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[productId]","in":"query","required":false,"description":"Filter productId (equality)","schema":{"type":"string"}},{"name":"filter[productId][ne]","in":"query","required":false,"description":"Filter productId (ne)","schema":{"type":"string"}},{"name":"filter[productId][gt]","in":"query","required":false,"description":"Filter productId (gt)","schema":{"type":"string"}},{"name":"filter[productId][gte]","in":"query","required":false,"description":"Filter productId (gte)","schema":{"type":"string"}},{"name":"filter[productId][lt]","in":"query","required":false,"description":"Filter productId (lt)","schema":{"type":"string"}},{"name":"filter[productId][lte]","in":"query","required":false,"description":"Filter productId (lte)","schema":{"type":"string"}},{"name":"filter[productId][in]","in":"query","required":false,"description":"Filter productId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productId][notIn]","in":"query","required":false,"description":"Filter productId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productId][between]","in":"query","required":false,"description":"Filter productId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productId][like]","in":"query","required":false,"description":"Filter productId (like)","schema":{"type":"string"}},{"name":"filter[lineType]","in":"query","required":false,"description":"Filter lineType (equality)","schema":{"type":"string"}},{"name":"filter[lineType][ne]","in":"query","required":false,"description":"Filter lineType (ne)","schema":{"type":"string"}},{"name":"filter[lineType][gt]","in":"query","required":false,"description":"Filter lineType (gt)","schema":{"type":"string"}},{"name":"filter[lineType][gte]","in":"query","required":false,"description":"Filter lineType (gte)","schema":{"type":"string"}},{"name":"filter[lineType][lt]","in":"query","required":false,"description":"Filter lineType (lt)","schema":{"type":"string"}},{"name":"filter[lineType][lte]","in":"query","required":false,"description":"Filter lineType (lte)","schema":{"type":"string"}},{"name":"filter[lineType][in]","in":"query","required":false,"description":"Filter lineType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lineType][notIn]","in":"query","required":false,"description":"Filter lineType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lineType][between]","in":"query","required":false,"description":"Filter lineType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lineType][like]","in":"query","required":false,"description":"Filter lineType (like)","schema":{"type":"string"}},{"name":"filter[priceModel]","in":"query","required":false,"description":"Filter priceModel (equality)","schema":{"type":"string"}},{"name":"filter[priceModel][ne]","in":"query","required":false,"description":"Filter priceModel (ne)","schema":{"type":"string"}},{"name":"filter[priceModel][gt]","in":"query","required":false,"description":"Filter priceModel (gt)","schema":{"type":"string"}},{"name":"filter[priceModel][gte]","in":"query","required":false,"description":"Filter priceModel (gte)","schema":{"type":"string"}},{"name":"filter[priceModel][lt]","in":"query","required":false,"description":"Filter priceModel (lt)","schema":{"type":"string"}},{"name":"filter[priceModel][lte]","in":"query","required":false,"description":"Filter priceModel (lte)","schema":{"type":"string"}},{"name":"filter[priceModel][in]","in":"query","required":false,"description":"Filter priceModel (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priceModel][notIn]","in":"query","required":false,"description":"Filter priceModel (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priceModel][between]","in":"query","required":false,"description":"Filter priceModel (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[priceModel][like]","in":"query","required":false,"description":"Filter priceModel (like)","schema":{"type":"string"}},{"name":"filter[pricingTerm]","in":"query","required":false,"description":"Filter pricingTerm (equality)","schema":{"type":"string"}},{"name":"filter[pricingTerm][ne]","in":"query","required":false,"description":"Filter pricingTerm (ne)","schema":{"type":"string"}},{"name":"filter[pricingTerm][gt]","in":"query","required":false,"description":"Filter pricingTerm (gt)","schema":{"type":"string"}},{"name":"filter[pricingTerm][gte]","in":"query","required":false,"description":"Filter pricingTerm (gte)","schema":{"type":"string"}},{"name":"filter[pricingTerm][lt]","in":"query","required":false,"description":"Filter pricingTerm (lt)","schema":{"type":"string"}},{"name":"filter[pricingTerm][lte]","in":"query","required":false,"description":"Filter pricingTerm (lte)","schema":{"type":"string"}},{"name":"filter[pricingTerm][in]","in":"query","required":false,"description":"Filter pricingTerm (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[pricingTerm][notIn]","in":"query","required":false,"description":"Filter pricingTerm (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[pricingTerm][between]","in":"query","required":false,"description":"Filter pricingTerm (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[pricingTerm][like]","in":"query","required":false,"description":"Filter pricingTerm (like)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency]","in":"query","required":false,"description":"Filter invoiceFrequency (equality)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][ne]","in":"query","required":false,"description":"Filter invoiceFrequency (ne)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][gt]","in":"query","required":false,"description":"Filter invoiceFrequency (gt)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][gte]","in":"query","required":false,"description":"Filter invoiceFrequency (gte)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][lt]","in":"query","required":false,"description":"Filter invoiceFrequency (lt)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][lte]","in":"query","required":false,"description":"Filter invoiceFrequency (lte)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][in]","in":"query","required":false,"description":"Filter invoiceFrequency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceFrequency][notIn]","in":"query","required":false,"description":"Filter invoiceFrequency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceFrequency][between]","in":"query","required":false,"description":"Filter invoiceFrequency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceFrequency][like]","in":"query","required":false,"description":"Filter invoiceFrequency (like)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure]","in":"query","required":false,"description":"Filter unitOfMeasure (equality)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][ne]","in":"query","required":false,"description":"Filter unitOfMeasure (ne)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][gt]","in":"query","required":false,"description":"Filter unitOfMeasure (gt)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][gte]","in":"query","required":false,"description":"Filter unitOfMeasure (gte)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][lt]","in":"query","required":false,"description":"Filter unitOfMeasure (lt)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][lte]","in":"query","required":false,"description":"Filter unitOfMeasure (lte)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][in]","in":"query","required":false,"description":"Filter unitOfMeasure (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitOfMeasure][notIn]","in":"query","required":false,"description":"Filter unitOfMeasure (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitOfMeasure][between]","in":"query","required":false,"description":"Filter unitOfMeasure (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitOfMeasure][like]","in":"query","required":false,"description":"Filter unitOfMeasure (like)","schema":{"type":"string"}},{"name":"filter[taxMode]","in":"query","required":false,"description":"Filter taxMode (equality)","schema":{"type":"string"}},{"name":"filter[taxMode][ne]","in":"query","required":false,"description":"Filter taxMode (ne)","schema":{"type":"string"}},{"name":"filter[taxMode][gt]","in":"query","required":false,"description":"Filter taxMode (gt)","schema":{"type":"string"}},{"name":"filter[taxMode][gte]","in":"query","required":false,"description":"Filter taxMode (gte)","schema":{"type":"string"}},{"name":"filter[taxMode][lt]","in":"query","required":false,"description":"Filter taxMode (lt)","schema":{"type":"string"}},{"name":"filter[taxMode][lte]","in":"query","required":false,"description":"Filter taxMode (lte)","schema":{"type":"string"}},{"name":"filter[taxMode][in]","in":"query","required":false,"description":"Filter taxMode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxMode][notIn]","in":"query","required":false,"description":"Filter taxMode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxMode][between]","in":"query","required":false,"description":"Filter taxMode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[taxMode][like]","in":"query","required":false,"description":"Filter taxMode (like)","schema":{"type":"string"}},{"name":"filter[enforceListPrice]","in":"query","required":false,"description":"Filter enforceListPrice (equality)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][ne]","in":"query","required":false,"description":"Filter enforceListPrice (ne)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][gt]","in":"query","required":false,"description":"Filter enforceListPrice (gt)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][gte]","in":"query","required":false,"description":"Filter enforceListPrice (gte)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][lt]","in":"query","required":false,"description":"Filter enforceListPrice (lt)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][lte]","in":"query","required":false,"description":"Filter enforceListPrice (lte)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][in]","in":"query","required":false,"description":"Filter enforceListPrice (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[enforceListPrice][notIn]","in":"query","required":false,"description":"Filter enforceListPrice (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[enforceListPrice][between]","in":"query","required":false,"description":"Filter enforceListPrice (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hasUsage]","in":"query","required":false,"description":"Filter hasUsage (equality)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][ne]","in":"query","required":false,"description":"Filter hasUsage (ne)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][gt]","in":"query","required":false,"description":"Filter hasUsage (gt)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][gte]","in":"query","required":false,"description":"Filter hasUsage (gte)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][lt]","in":"query","required":false,"description":"Filter hasUsage (lt)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][lte]","in":"query","required":false,"description":"Filter hasUsage (lte)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][in]","in":"query","required":false,"description":"Filter hasUsage (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasUsage][notIn]","in":"query","required":false,"description":"Filter hasUsage (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasUsage][between]","in":"query","required":false,"description":"Filter hasUsage (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hasBeenUsed]","in":"query","required":false,"description":"Filter hasBeenUsed (equality)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][ne]","in":"query","required":false,"description":"Filter hasBeenUsed (ne)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][gt]","in":"query","required":false,"description":"Filter hasBeenUsed (gt)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][gte]","in":"query","required":false,"description":"Filter hasBeenUsed (gte)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][lt]","in":"query","required":false,"description":"Filter hasBeenUsed (lt)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][lte]","in":"query","required":false,"description":"Filter hasBeenUsed (lte)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][in]","in":"query","required":false,"description":"Filter hasBeenUsed (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasBeenUsed][notIn]","in":"query","required":false,"description":"Filter hasBeenUsed (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasBeenUsed][between]","in":"query","required":false,"description":"Filter hasBeenUsed (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentProductLineId]","in":"query","required":false,"description":"Filter parentProductLineId (equality)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][ne]","in":"query","required":false,"description":"Filter parentProductLineId (ne)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][gt]","in":"query","required":false,"description":"Filter parentProductLineId (gt)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][gte]","in":"query","required":false,"description":"Filter parentProductLineId (gte)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][lt]","in":"query","required":false,"description":"Filter parentProductLineId (lt)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][lte]","in":"query","required":false,"description":"Filter parentProductLineId (lte)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][in]","in":"query","required":false,"description":"Filter parentProductLineId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentProductLineId][notIn]","in":"query","required":false,"description":"Filter parentProductLineId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentProductLineId][between]","in":"query","required":false,"description":"Filter parentProductLineId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentProductLineId][like]","in":"query","required":false,"description":"Filter parentProductLineId (like)","schema":{"type":"string"}},{"name":"filter[dataSource]","in":"query","required":false,"description":"Filter dataSource (equality)","schema":{"type":"string"}},{"name":"filter[dataSource][ne]","in":"query","required":false,"description":"Filter dataSource (ne)","schema":{"type":"string"}},{"name":"filter[dataSource][gt]","in":"query","required":false,"description":"Filter dataSource (gt)","schema":{"type":"string"}},{"name":"filter[dataSource][gte]","in":"query","required":false,"description":"Filter dataSource (gte)","schema":{"type":"string"}},{"name":"filter[dataSource][lt]","in":"query","required":false,"description":"Filter dataSource (lt)","schema":{"type":"string"}},{"name":"filter[dataSource][lte]","in":"query","required":false,"description":"Filter dataSource (lte)","schema":{"type":"string"}},{"name":"filter[dataSource][in]","in":"query","required":false,"description":"Filter dataSource (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][notIn]","in":"query","required":false,"description":"Filter dataSource (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][between]","in":"query","required":false,"description":"Filter dataSource (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource][like]","in":"query","required":false,"description":"Filter dataSource (like)","schema":{"type":"string"}},{"name":"filter[createdDate]","in":"query","required":false,"description":"Filter createdDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][ne]","in":"query","required":false,"description":"Filter createdDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gt]","in":"query","required":false,"description":"Filter createdDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gte]","in":"query","required":false,"description":"Filter createdDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lt]","in":"query","required":false,"description":"Filter createdDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lte]","in":"query","required":false,"description":"Filter createdDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][in]","in":"query","required":false,"description":"Filter createdDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][notIn]","in":"query","required":false,"description":"Filter createdDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][between]","in":"query","required":false,"description":"Filter createdDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","productId","-productId","productName","-productName","name","-name","lineType","-lineType","priceModel","-priceModel","pricingTerm","-pricingTerm","invoiceFrequency","-invoiceFrequency","unitOfMeasure","-unitOfMeasure","taxMode","-taxMode","enforceListPrice","-enforceListPrice","hasUsage","-hasUsage","hasBeenUsed","-hasBeenUsed","parentProductLineId","-parentProductLineId","dataSource","-dataSource","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","productId","productName","productLineNumber","name","lineType","priceModel","pricingTerm","invoiceFrequency","unitOfMeasure","taxMode","enforceListPrice","hasUsage","hasBeenUsed","commitInvoicing","prepaidBalanceOverConsumptionBehavior","prepaidBalanceRolloverAtRenewal","parentProductLineId","crmProductId","dataSource","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/productLinesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List product lines","description":"Lists product lines. Each item is the product line without its tax records, pricing, and external identifiers. To get the tax records, pricing, and external identifiers, use GET accounting/product-lines/:id or POST accounting/product-lines/search. To filter by free text, product line number, CRM identifier, or external identifier, use POST accounting/product-lines/search.","tags":["accounting/products/productLines"]}},"/accounting/reports/trial-balance/search":{"post":{"operationId":"searchTrialBalance","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchTrialBalanceOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"functionalDebit":{"type":"string","format":"decimal"},"functionalCredit":{"type":"string","format":"decimal"},"difference":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["functionalDebit","functionalCredit","difference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_REPORT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false},"examples":{"balanced":{"value":{"data":{"items":[{"accountId":"64e38cef-4809-47b8-b014-59065920d070","accountNumber":"111100","accountName":"Banks","accountType":"asset","isGroupingAccount":true,"parentAccountId":"fdab0cfb-add5-4c96-bc58-41a2a81bda65","functionalStartingBalance":"0","functionalDebit":"5004791.99","functionalCredit":"514762.02","functionalEndingBalance":"4490029.97"},{"accountId":"0383f7c4-6176-4dc3-89e7-48c49511070f","accountNumber":"111101","accountName":"Chase Checking","accountType":"asset","isGroupingAccount":false,"parentAccountId":"64e38cef-4809-47b8-b014-59065920d070","functionalStartingBalance":"0","functionalDebit":"5000701.99","functionalCredit":"503350.02","functionalEndingBalance":"4497351.97"}],"totals":{"functionalStartingBalance":"0","functionalDebit":"6156388.01","functionalCredit":"6156388.01","functionalEndingBalance":"0"},"tiesOut":true,"reportingCurrency":"USD"}},"summary":"A full year on the posting-date axis, single entity. Debits equal credits, so the report ties out."},"emptyWindow":{"value":{"data":{"items":[],"totals":{"functionalStartingBalance":"0","functionalDebit":"0","functionalCredit":"0","functionalEndingBalance":"0"},"tiesOut":true,"reportingCurrency":"USD"}},"summary":"A window before any posting exists. The scope resolved, so this is a genuinely empty period rather than a failed lookup, and it comes back as an empty items array with an EMPTY_REPORT warning."}}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE_RANGE, ENTITY_NOT_FOUND, BOOK_NOT_FOUND, CONSOLIDATION_ACCOUNT_MAPPING_MISSING, CONSOLIDATION_RATES_NOT_CONFIGURED, EXCHANGE_RATE_NOT_FOUND, TRIAL_BALANCE_CALCULATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNT_MAPPING_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_RATES_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_CALCULATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"functionalDebit":{"type":"string","format":"decimal"},"functionalCredit":{"type":"string","format":"decimal"},"difference":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["functionalDebit","functionalCredit","difference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_REPORT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNT_MAPPING_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_RATES_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_CALCULATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"functionalDebit":{"type":"string","format":"decimal"},"functionalCredit":{"type":"string","format":"decimal"},"difference":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["functionalDebit","functionalCredit","difference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_REPORT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchTrialBalanceInput"},"examples":{"balanced":{"value":{"entityId":"ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3","bookId":"8d534b26-2998-40dd-8727-9fe3f89ff503","consolidated":false,"startDate":"2025-01-01","endDate":"2025-12-31","dateAxis":"postingDate"},"summary":"A full year on the posting-date axis, single entity. Debits equal credits, so the report ties out."},"emptyWindow":{"value":{"entityId":"ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3","bookId":"8d534b26-2998-40dd-8727-9fe3f89ff503","consolidated":false,"startDate":"1990-01-01","endDate":"1990-01-31","dateAxis":"postingDate"},"summary":"A window before any posting exists. The scope resolved, so this is a genuinely empty period rather than a failed lookup, and it comes back as an empty items array with an EMPTY_REPORT warning."}}}}},"summary":"Retrieve a trial balance","description":"Retrieves the trial balance for one legal entity, book, and date range. The response has one item per account with a balance or a movement between startDate and endDate. The items cover the whole chart of accounts, so they include grouping accounts as well as the accounts below them.\n\nA grouping account's figures repeat the sums of the accounts below it. To add up the report, sum only the items where isGroupingAccount is false, or use totals.\n\nThe report is not paginated, because a partial page would not balance.","tags":["accounting/reports/trialBalances"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/reports/general-ledger":{"post":{"operationId":"readGeneralLedger","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/readGeneralLedgerOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"RESULT_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedFilters":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["appliedFilters"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_TRANSACTION_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"affectedLineCount":{"type":"number"}},"additionalProperties":false,"required":["affectedLineCount"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: RESULT_TOO_LARGE, WINDOW_TOO_LONG, DATE_RANGE_REQUIRED, AMBIGUOUS_DATE_FILTER, ENTITY_NOT_FOUND, BOOK_NOT_FOUND, PERIOD_NOT_FOUND, CONSOLIDATION_ACCOUNTS_NOT_CONFIGURED, CONSOLIDATION_ACCOUNT_MAPPING_MISSING, CONSOLIDATION_RATES_NOT_CONFIGURED, EXCHANGE_RATE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RESULT_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number"},"maximumLineCount":{"type":"number"}},"additionalProperties":false,"required":["lineCount","maximumLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WINDOW_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requestedDays":{"type":"number"},"maximumDays":{"type":"number"}},"additionalProperties":false,"required":["requestedDays","maximumDays"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_RANGE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMBIGUOUS_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"periodId":{"type":"string"}},"additionalProperties":false,"required":["periodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNTS_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingProcess":{"type":"string"}},"additionalProperties":false,"required":["accountingProcess"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNT_MAPPING_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_RATES_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESULT_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedFilters":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["appliedFilters"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_TRANSACTION_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"affectedLineCount":{"type":"number"}},"additionalProperties":false,"required":["affectedLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RESULT_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number"},"maximumLineCount":{"type":"number"}},"additionalProperties":false,"required":["lineCount","maximumLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WINDOW_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requestedDays":{"type":"number"},"maximumDays":{"type":"number"}},"additionalProperties":false,"required":["requestedDays","maximumDays"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_RANGE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMBIGUOUS_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"periodId":{"type":"string"}},"additionalProperties":false,"required":["periodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNTS_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingProcess":{"type":"string"}},"additionalProperties":false,"required":["accountingProcess"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNT_MAPPING_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_RATES_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESULT_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedFilters":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["appliedFilters"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_TRANSACTION_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"affectedLineCount":{"type":"number"}},"additionalProperties":false,"required":["affectedLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/readGeneralLedgerInput"}}}},"summary":"Retrieve a general ledger report","description":"Retrieves a general ledger report. The response has the journal entry lines posted to the general ledger in the date range. The response also has the calculated lines that make the financial statements balance, such as retained earnings lines. When consolidated is true, these include elimination and currency translation lines.\n\nThe report shows movements only, with no opening, closing, or running balance.\n\nThe report is not paginated. One response can have at most 250,000 lines, and a request with more fails with RESULT_TOO_LARGE. Narrow the request until it returns in one response.","tags":["accounting/reports/generalLedger"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/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/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/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"]}},"/inventory/shipments":{"post":{"operationId":"createShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"fromACustomerRma":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}},"summary":"Six damaged units coming back against a delivery line"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, SOURCE_LINE_NOT_PROJECTED, INVALID_QUANTITY, MIXED_LOCATIONS, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createShipmentInput"},"examples":{"fromACustomerRma":{"value":{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-19","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","currency":"EUR","notes":"Palletised","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","notes":"Ship complete"}]},"summary":"Six damaged units coming back against a delivery line"}}}}},"summary":"Create a shipment","description":"Creates a shipment as a draft. No stock leaves and no journal entry records the cost of sale until you commit the shipment with POST inventory/shipments/:id/commit.\n\nEvery line must leave from the same warehouse. Otherwise the request fails with MIXED_LOCATIONS before anything is written.\n\nThe response is the created shipment with its lines.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryShipments"]},"get":{"operationId":"shipments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryDate]","in":"query","required":false,"description":"Filter deliveryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][ne]","in":"query","required":false,"description":"Filter deliveryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gt]","in":"query","required":false,"description":"Filter deliveryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gte]","in":"query","required":false,"description":"Filter deliveryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lt]","in":"query","required":false,"description":"Filter deliveryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lte]","in":"query","required":false,"description":"Filter deliveryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][in]","in":"query","required":false,"description":"Filter deliveryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][notIn]","in":"query","required":false,"description":"Filter deliveryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][between]","in":"query","required":false,"description":"Filter deliveryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId]","in":"query","required":false,"description":"Filter shipmentCarrierId (equality)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][ne]","in":"query","required":false,"description":"Filter shipmentCarrierId (ne)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][gt]","in":"query","required":false,"description":"Filter shipmentCarrierId (gt)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][gte]","in":"query","required":false,"description":"Filter shipmentCarrierId (gte)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][lt]","in":"query","required":false,"description":"Filter shipmentCarrierId (lt)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][lte]","in":"query","required":false,"description":"Filter shipmentCarrierId (lte)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][in]","in":"query","required":false,"description":"Filter shipmentCarrierId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[shipmentCarrierId][notIn]","in":"query","required":false,"description":"Filter shipmentCarrierId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[shipmentCarrierId][between]","in":"query","required":false,"description":"Filter shipmentCarrierId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[shipmentCarrierId][like]","in":"query","required":false,"description":"Filter shipmentCarrierId (like)","schema":{"type":"string"}},{"name":"filter[returnStatus]","in":"query","required":false,"description":"Filter returnStatus (equality)","schema":{"type":"string"}},{"name":"filter[returnStatus][ne]","in":"query","required":false,"description":"Filter returnStatus (ne)","schema":{"type":"string"}},{"name":"filter[returnStatus][gt]","in":"query","required":false,"description":"Filter returnStatus (gt)","schema":{"type":"string"}},{"name":"filter[returnStatus][gte]","in":"query","required":false,"description":"Filter returnStatus (gte)","schema":{"type":"string"}},{"name":"filter[returnStatus][lt]","in":"query","required":false,"description":"Filter returnStatus (lt)","schema":{"type":"string"}},{"name":"filter[returnStatus][lte]","in":"query","required":false,"description":"Filter returnStatus (lte)","schema":{"type":"string"}},{"name":"filter[returnStatus][in]","in":"query","required":false,"description":"Filter returnStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnStatus][notIn]","in":"query","required":false,"description":"Filter returnStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnStatus][between]","in":"query","required":false,"description":"Filter returnStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnStatus][like]","in":"query","required":false,"description":"Filter returnStatus (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","deliveryDate","-deliveryDate","documentStatus","-documentStatus","totalAmount","-totalAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","deliveryDate","entityId","entityName","businessPartnerId","businessPartnerName","shipmentCarrierId","shipmentCarrierName","returnStatus","referenceNumber","trackingNumber","currency","totalAmount","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/shipmentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","returnStatus":"OPEN","referenceNumber":"SO-4471","trackingNumber":"3STBJG7291043","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lineCount":1},{"id":"a4e81c07-52fb-4d93-8206-71b3fe0c9d54","documentNumber":"SD-8842","documentStatus":"SHIPPED","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","returnStatus":"OPEN","referenceNumber":"SO-4471","trackingNumber":"3STBJG7291043","currency":"EUR","totalAmount":"2400.00","notes":"Two pallets","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-16T11:45:00.000Z","lineCount":3}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List shipments","description":"Lists shipments. The response has each shipment's main fields, without its lines. lineCount is the number of lines. To get the lines, or to filter by customer, item, warehouse, reference number, or tracking number, use POST inventory/shipments/search.","tags":["inventoryShipments"]}},"/inventory/serial-numbers/{id}":{"get":{"operationId":"getSerialNumber","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSerialNumberOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"onHand":{"value":{"data":{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","manufacturerSerialNumber":"MFG-77-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"cost":"250","originalCost":"250","currency":"GBP","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"A unit that is in stock."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the serial number you want to retrieve. Format: UUID.","examples":{"onHand":{"value":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"}}}],"summary":"Retrieve a serial number","description":"Retrieves a serial number, with its costs.","tags":["inventorySerialNumbers"]},"patch":{"operationId":"updateSerialNumber","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSerialNumberOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"recordManufacturerSerial":{"value":{"data":{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"}},"summary":"Record the manufacturer's serial number for a unit."},"retire":{"value":{"data":{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"}},"summary":"Turn off a unit without deleting it or its history."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the serial number you want to update. Format: UUID.","examples":{"recordManufacturerSerial":{"value":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"},"retire":{"value":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSerialNumberInput"},"examples":{"recordManufacturerSerial":{"value":{"manufacturerSerialNumber":"MFG-77-000418"},"summary":"Record the manufacturer's serial number for a unit."},"retire":{"value":{"active":false},"summary":"Turn off a unit without deleting it or its history."}}}}},"summary":"Update a serial number","description":"Updates a serial number with the fields you send. A field you leave out keeps its current value. You cannot remove a field's value, because null is not accepted.\n\nThe response contains only the `id`. To see the updated serial number, use GET inventory/serial-numbers/:id.","tags":["inventorySerialNumbers"]}},"/inventory/bins/bulk-delete":{"post":{"operationId":"bulkDeleteBins","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteBinsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["detailRows","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["detailRows","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["detailRows","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteBinsInput"}}}},"summary":"Bulk delete bins","description":"Deletes multiple bins in one request. Only empty bins can be deleted. The response lists the deleted bins' ids in the order you sent them.\n\nIf any id matches no bin, or any bin still has stock, none are deleted. To close a bin that still has stock, set active to false with PATCH inventory/bins/:id.\n\nTo delete a single bin, use DELETE inventory/bins/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryBins"]}},"/inventory/account-determination-rules/bulk":{"post":{"operationId":"bulkCreateAccountDeterminationRules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateAccountDeterminationRulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"standingUpAConfiguration":{"value":{"data":{"created":[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}]}},"summary":"Several rules for one legal entity, created in one request. The response lists them in the same order."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, BOOK_REQUIRED, DUPLICATE_RULE_TUPLE, UNKNOWN_PARENT_ACCOUNT_TYPE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID. An empty string when the clash is with an earlier rule in the list."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule. When the clash is with an earlier rule in the list, it is the label of the rule at `index` instead."},"index":{"type":"number","description":"The position of the rule in the list you sent. The first rule is 0, the second is 1."}},"additionalProperties":false,"required":["existingId","existingRuleName","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentAccountType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID. An empty string when the clash is with an earlier rule in the list."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule. When the clash is with an earlier rule in the list, it is the label of the rule at `index` instead."},"index":{"type":"number","description":"The position of the rule in the list you sent. The first rule is 0, the second is 1."}},"additionalProperties":false,"required":["existingId","existingRuleName","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentAccountType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID. An empty string when the clash is with an earlier rule in the list."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule. When the clash is with an earlier rule in the list, it is the label of the rule at `index` instead."},"index":{"type":"number","description":"The position of the rule in the list you sent. The first rule is 0, the second is 1."}},"additionalProperties":false,"required":["existingId","existingRuleName","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentAccountType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateAccountDeterminationRulesInput"},"examples":{"standingUpAConfiguration":{"value":{"accountDeterminationRules":[{"ruleName":"Finished goods — receipts","priority":10,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}}]},"summary":"Several rules for one legal entity, created in one request. The response lists them in the same order."}}}}},"summary":"Bulk create account determination rules","description":"Creates multiple account determination rules in one request. The response lists the new rules' ids in the order you sent them. If one rule cannot be created, the request fails and no rules are created.\n\nTo create a single rule, use POST inventory/account-determination-rules.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryAccountDeterminationRules"]}},"/inventory/receipts/{id}":{"delete":{"operationId":"deleteReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"discardADraft":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}},"summary":"A draft raised against the wrong vendor"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the receipt you want to delete.","examples":{"discardADraft":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}}}],"summary":"Delete a receipt","description":"Deletes a receipt. The receipt's lines and their batch, serial, and bin detail are deleted with it.\n\nOnly a receipt in draft status can be deleted. A committed receipt has already brought the stock in and created the journal entry for the accrual, and no endpoint cancels it.","tags":["inventoryReceipts"]},"get":{"operationId":"getReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDraftReceipt":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}},"summary":"A receipt prepared against a sales order, not yet sent"},"afterCommitting":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"COMMITTED","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T10:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}},"summary":"The same receipt once posted — the stock is in and the accrual raised"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the receipt you want to retrieve.","examples":{"aDraftReceipt":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"},"afterCommitting":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}}}],"summary":"Retrieve a receipt","description":"Retrieves a receipt. Use the receipt's id, not its documentNumber.\n\nThe response includes all of the receipt's lines and their batch, serial, and bin detail. POST inventory/receipts/search returns the same fields. The collection GET inventory/receipts returns the receipt's main fields only, with lineCount instead of the lines.\n\nRead lineType before reading a line. An Inventory line has an item, a warehouse, and a quantity. A Service or Expense line has serviceDescription, an amount, and an expense account instead, and no item or warehouse.","tags":["inventoryReceipts"]},"patch":{"operationId":"updateReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"correctTheReferenceAndTrackingNumber":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77121","trackingNumber":"1Z999AA10123456784","currency":"EUR","totalAmount":"712.20","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:45:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"196.00","inventoryQuantity":"196.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"627.20","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}},"summary":"The vendor's delivery note number was corrected, the carrier's tracking number arrived after the goods, and the count came up short"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, LINE_TOTAL_MISMATCH, INCOMPLETE_LINE, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, LOCATION_ENTITY_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the receipt you want to update.","examples":{"correctTheReferenceAndTrackingNumber":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateReceiptInput"},"examples":{"correctTheReferenceAndTrackingNumber":{"value":{"referenceNumber":"DN-77121","trackingNumber":"1Z999AA10123456784","updateLines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"196.00"}]},"summary":"The vendor's delivery note number was corrected, the carrier's tracking number arrived after the goods, and the count came up short"}}}}},"summary":"Update a receipt","description":"Updates a receipt with the fields you send. A field you leave out keeps its current value.\n\nUse the receipt's id, not its documentNumber.\n\nLines change through three separate arrays. updateLines and createLines are applied first, then deleteLines. Leave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value.\n\nOn an updateLines item, sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin detail the line should keep. Leave all three out to keep the line's tracking as it is.\n\nChanges a draft receipt's details and its lines. A receipt in any other status can't be changed.\n\nOne request can remove a line and add its replacement. If a line id in deleteLines or updateLines is not on this receipt, the request fails with REFERENCE_NOT_FOUND.\n\nEvery line's warehouse must belong to the receipt's legal entity, including a line moved to another warehouse. Otherwise the request fails with LOCATION_ENTITY_MISMATCH.\n\nThe response is the updated receipt, with the same fields GET inventory/receipts/:id returns.","tags":["inventoryReceipts"]}},"/inventory/warehouse-transfers/search":{"post":{"operationId":"searchWarehouseTransfers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchWarehouseTransfersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"whatStillNeedsInvoicing":{"value":{"data":{"items":[{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","documentNumber":"WTR-2292","documentStatus":"COMMITTED","transferType":"INTERCOMPANY","billingStatus":"NOT_BILLED","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Committed intercompany transfers whose bill has not been raised"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchWarehouseTransfersInput"},"examples":{"whatStillNeedsInvoicing":{"value":{"filters":{"transferType":"INTERCOMPANY","documentStatus":"COMMITTED","billingStatus":"NOT_BILLED"},"page":{"size":25}},"summary":"Committed intercompany transfers whose bill has not been raised"}}}}},"summary":"Search warehouse transfers","description":"Searches warehouse transfers. Each transfer comes back in full, lines included, with the same fields as GET inventory/warehouse-transfers/:id.\n\nThis endpoint can filter by itemId and referenceNumber, which the collection GET inventory/warehouse-transfers can't. itemId matches transfers that have at least one line for the item.","tags":["inventoryWarehouseTransfers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/unit-of-measure-groups/search":{"post":{"operationId":"searchUnitOfMeasureGroups","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchUnitOfMeasureGroupsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"whichGroupsConvertThisUnit":{"value":{"data":{"items":[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846","name":"Packaging","description":"Eaches, boxes and pallets","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","baseUnitCode":"EA","lines":[{"id":"9f1b60d4-27ac-4e53-b8f1-05d3e79a2c68","unitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","conversionFactor":"1.00","isBaseUnit":true},{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"BOX","unitName":"Box","conversionFactor":"12.00","isBaseUnit":false}],"lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"The question the collection route cannot answer — every group with a line for BOX"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchUnitOfMeasureGroupsInput"},"examples":{"whichGroupsConvertThisUnit":{"value":{"filters":{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}},"summary":"The question the collection route cannot answer — every group with a line for BOX"}}}}},"summary":"Search unit of measure groups","description":"Searches unit of measure groups. The filters are name, a unit of measure the group converts, and when the group last changed. Each group comes back whole, with its base unit and conversion lines.\n\nOnly this endpoint can find the groups that convert a given unit of measure, with filters.unitOfMeasureId.","tags":["inventoryUnitOfMeasureGroups"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/item-attributes/{id}":{"get":{"operationId":"getItemAttribute","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getItemAttributeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"tagged":{"value":{"data":{"id":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","attributeId":"c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48","attributeName":"Colour","valueId":"2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03","value":"Red"}},"summary":"An item tagged with a color"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the item attribute to read.","examples":{"tagged":{"value":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"}}}],"summary":"Retrieve an item attribute","description":"Retrieves an item attribute. The same fields come back from GET inventory/item-attributes. The item's code and the attribute's name are returned beside their identifiers, so a row can be rendered without three further calls.","tags":["inventoryItemAttributes"]},"delete":{"operationId":"deleteItemAttribute","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteItemAttributeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"untag":{"value":{"data":{"id":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"}},"summary":"Remove a color tag from an item"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the item attribute to remove.","examples":{"untag":{"value":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"}}}],"summary":"Remove an item attribute","description":"Removes one attribute assignment from an item. Nothing references an assignment, so there is no in-use check and the delete always succeeds for an identifier that exists. The attribute definition and its allowed values are untouched — this removes the item's link to the value, not the value itself.","tags":["inventoryItemAttributes"]}},"/inventory/inventory-decreases/{id}/commit":{"post":{"operationId":"commitInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"postTheCount":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":[]}},"summary":"The write-off is posted; stock falls and a journal entry is written"},"postWithASoftBinBreach":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":["Bin A-01-02 is left below its configured minimum"]}},"summary":"The destination bin is over its configured limit, but not configured to hard-block, so the commit succeeds with an advisory"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. 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 draft inventory decrease you want to commit.","examples":{"postTheCount":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"},"postWithASoftBinBreach":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitInventoryDecreaseInput"},"examples":{"postTheCount":{"value":{},"summary":"The write-off is posted; stock falls and a journal entry is written"},"postWithASoftBinBreach":{"value":{},"summary":"The destination bin is over its configured limit, but not configured to hard-block, so the commit succeeds with an advisory"}}}}},"summary":"Commit an inventory decrease","description":"Commits an inventory decrease. The lines' quantities leave stock and documentStatus becomes 'COMMITTED'. The response includes journalEntryId and any warnings.\n\nOnly a draft can be committed. Stock is checked when you commit, not when you created the draft. Each line needs enough stock at its item and location, or the request fails with POSTING_REJECTED.\n\nA committed inventory decrease can't be changed or deleted, and no endpoint cancels it.\n\nCommits of the same item at the same location may run at the same time. A database write conflict between them is not a rejection: the platform retries the request, so it never returns POSTING_REJECTED.","tags":["inventoryInventoryDecreases"]}},"/inventory/warehouses/bulk-delete":{"post":{"operationId":"bulkDeleteWarehouses","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteWarehousesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WAREHOUSE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteWarehousesInput"}}}},"summary":"Bulk delete warehouses","description":"Deletes multiple warehouses in one request. If any id is unknown, or names a warehouse still in use, none are deleted.\n\nA warehouse is in use while it has stock records, movement history, bins, inventory counts, or allocations. To retire it instead, set isActive to false with PATCH inventory/warehouses/:id.\n\nThe response has each deleted warehouse's id and locationCode, in the order you sent them. To delete one warehouse, use DELETE inventory/warehouses/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouses"]}},"/inventory/batch-transactions/search":{"post":{"operationId":"searchBatchTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBatchTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"traceABatch":{"value":{"data":{"items":[{"id":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"500.00","cost":"3.75","valueDelta":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every batch transaction for one batch, found by its batch number."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBatchTransactionsInput"},"examples":{"traceABatch":{"value":{"filters":{"batchNumber":"LOT-2026-08-14"}},"summary":"Every batch transaction for one batch, found by its batch number."}}}}},"summary":"Search batch transactions","description":"Searches batch transactions. Results are in the order the batch transactions were created, not in order of `transactionDate`.","tags":["inventoryBatchTransactions"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/account-determination-rules/bulk-delete":{"post":{"operationId":"bulkDeleteAccountDeterminationRules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteAccountDeterminationRulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteAccountDeterminationRulesInput"}}}},"summary":"Bulk delete account determination rules","description":"Deletes multiple account determination rules in one request. Each rule's reason-code overrides are deleted with it. The response lists each deleted rule's `id` and `ruleName` in the order you sent the ids. If one rule cannot be deleted, the request fails and no rules are deleted.\n\nJournal entries that already used the rules do not change.\n\nTo turn off a rule without deleting it, set `isActive` to false with PATCH inventory/account-determination-rules/:id. To delete a single rule, use DELETE inventory/account-determination-rules/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryAccountDeterminationRules"]}},"/inventory/item-types/search":{"post":{"operationId":"searchItemTypes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchItemTypesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"serviceTypes":{"value":{"data":{"items":[{"id":"b1d47e29-3c86-4a05-9f72-04e5c13b8a60","name":"Service","description":"Bought but never stocked","procurable":true,"stockable":false,"active":true,"itemCount":7,"lastModifiedDate":"2026-08-18T09:15:02.108Z"}],"pagination":{"hasMore":false}}},"summary":"The types a charge item belongs under"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchItemTypesInput"},"examples":{"serviceTypes":{"value":{"filters":{"stockable":false}},"summary":"The types a charge item belongs under"}}}}},"summary":"Search item types","description":"Searches item types. The filters go in the request body. The fields are the same as on GET inventory/item-types/:id, including itemCount.","tags":["inventoryItemTypes"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/items/search":{"post":{"operationId":"searchItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"beforeAllocating":{"value":{"data":{"items":[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","itemTypeName":"Stocked good","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","categoryName":"Components","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","inventoryUnitCode":"EA","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","unitGroupName":"Each","valuationMethod":"movingAverage","isBatch":false,"isSerial":false,"isInventory":true,"isSalesItem":true,"isPurchaseItem":true,"active":true,"weight":"1.4","weightUnit":"Kg","lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Which items would break a Weight allocation"},"byCategory":{"value":{"data":{"items":[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","itemTypeName":"Stocked good","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","categoryName":"Components","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","inventoryUnitCode":"EA","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","unitGroupName":"Each","valuationMethod":"movingAverage","isBatch":false,"isSerial":false,"isInventory":true,"isSalesItem":true,"isPurchaseItem":true,"active":true,"weight":"1.4","weightUnit":"Kg","lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Every active item in a category"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchItemsInput"},"examples":{"beforeAllocating":{"value":{"filters":{"missingWeight":true},"page":{"size":50}},"summary":"Which items would break a Weight allocation"},"byCategory":{"value":{"filters":{"categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","active":true}},"summary":"Every active item in a category"}}}}},"summary":"Search items","description":"Searches items. The filters go in the request body. The fields are the same as on GET inventory/items/:id, including standardCost, itemPurchasePrice, and currency.\n\nmissingWeight finds the items with no weight, and missingDimensions finds the items missing a length, width, or height. A landed cost's Weight or Volume allocation needs these values. The allocation also refuses a value of 0, which these filters don't find. The collection GET inventory/items cannot filter on either.","tags":["inventoryItems"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/sales-returns":{"get":{"operationId":"salesReturns","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryDate]","in":"query","required":false,"description":"Filter deliveryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][ne]","in":"query","required":false,"description":"Filter deliveryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gt]","in":"query","required":false,"description":"Filter deliveryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gte]","in":"query","required":false,"description":"Filter deliveryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lt]","in":"query","required":false,"description":"Filter deliveryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lte]","in":"query","required":false,"description":"Filter deliveryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][in]","in":"query","required":false,"description":"Filter deliveryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][notIn]","in":"query","required":false,"description":"Filter deliveryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][between]","in":"query","required":false,"description":"Filter deliveryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[returnType]","in":"query","required":false,"description":"Filter returnType (equality)","schema":{"type":"string"}},{"name":"filter[returnType][ne]","in":"query","required":false,"description":"Filter returnType (ne)","schema":{"type":"string"}},{"name":"filter[returnType][gt]","in":"query","required":false,"description":"Filter returnType (gt)","schema":{"type":"string"}},{"name":"filter[returnType][gte]","in":"query","required":false,"description":"Filter returnType (gte)","schema":{"type":"string"}},{"name":"filter[returnType][lt]","in":"query","required":false,"description":"Filter returnType (lt)","schema":{"type":"string"}},{"name":"filter[returnType][lte]","in":"query","required":false,"description":"Filter returnType (lte)","schema":{"type":"string"}},{"name":"filter[returnType][in]","in":"query","required":false,"description":"Filter returnType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][notIn]","in":"query","required":false,"description":"Filter returnType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][between]","in":"query","required":false,"description":"Filter returnType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnType][like]","in":"query","required":false,"description":"Filter returnType (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","deliveryDate","-deliveryDate","documentStatus","-documentStatus","totalAmount","-totalAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","deliveryDate","entityId","entityName","businessPartnerId","businessPartnerName","currency","totalAmount","returnFeeAmount","returnType","lineCount","referenceNumber","trackingNumber","sourceDocumentId","sourceDocumentType","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/salesReturnsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lineCount":1},{"id":"b81c4f30-27de-4a95-8106-3fd7e5a2c914","documentNumber":"SR-1043","documentStatus":"RECEIVED","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","currency":"EUR","totalAmount":"312.00","returnFeeAmount":"0.00","notes":"Wrong size shipped","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-16T11:45:00.000Z","lineCount":3}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List sales returns","description":"Lists sales returns, without their lines. Each return comes back with lineCount instead of its lines. To read the lines, use GET inventory/sales-returns/:id or POST inventory/sales-returns/search.\n\nTo filter by customer, reference number, tracking number, item, or warehouse, use POST inventory/sales-returns/search.","tags":["inventorySalesReturns"]},"post":{"operationId":"createSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"fromACustomerRma":{"value":{"data":{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}},"summary":"Six damaged units coming back against a delivery line"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSalesReturnInput"},"examples":{"fromACustomerRma":{"value":{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-18","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","notes":"Customer reports transit damage","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]},"summary":"Six damaged units coming back against a delivery line"}}}}},"summary":"Create a sales return","description":"Creates a sales return as a draft. The draft lists what the customer is sending back, line by line. No stock moves and no credit is created until you commit the return with POST inventory/sales-returns/:id/commit.\n\nThe response is the created return with its lines, in the same shape as GET inventory/sales-returns/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventorySalesReturns"]}},"/inventory/batch-numbers/search":{"post":{"operationId":"searchBatchNumbers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBatchNumbersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"quarantined":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Quarantined batches. None match in this example."},"shelfLife":{"value":{"data":{"items":[{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchNumber":"LOT-2026-0448","manufacturerBatchNumber":"MFG-8842-C","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","quantity":"400","inStock":"260","cost":"12.5","originalCost":"12","currency":"GBP","expirationDate":"2027-03-31","batchStatus":"ACTIVE","temperatureBreach":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Batches still in stock that expire by the end of the year."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBatchNumbersInput"},"examples":{"quarantined":{"value":{"filters":{"batchStatus":"QUARANTINED"}},"summary":"Quarantined batches. None match in this example."},"shelfLife":{"value":{"filters":{"expiringBefore":"2027-12-31","inStock":true}},"summary":"Batches still in stock that expire by the end of the year."}}}}},"summary":"Search batch numbers","description":"Searches batch numbers, with their costs. For a shelf-life check, send `expiringBefore` with `inStock` true to find the batches still in stock that expire by a date.","tags":["inventoryBatchNumbers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/landed-costs/{id}/commit":{"post":{"operationId":"commitLandedCost","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitLandedCostOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"capitalise":{"value":{"data":{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentStatus":"COMMITTED","totalChargeAmount":"240","revaluationIds":["f0a25c71-8d43-4e96-b2c8-51730e9a4d62"],"warnings":[]}},"summary":"Committing a landed cost with one £240 freight charge. The commit creates one inventory revaluation."},"twoAccounts":{"value":{"data":{"id":"a4f92c05-7b31-4e68-9d02-5c17e83b6a49","documentStatus":"COMMITTED","totalChargeAmount":"420","revaluationIds":["f0a25c71-8d43-4e96-b2c8-51730e9a4d62","3b8e40d9-6c15-4a72-8f03-9d21e75b0c48"],"warnings":[]}},"summary":"Committing a landed cost whose freight and duty charges have different expense accounts. The commit creates one inventory revaluation for each account."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, VALIDATION_FAILED, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost you want to commit. Format: UUID.","examples":{"capitalise":{"value":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"},"twoAccounts":{"value":"a4f92c05-7b31-4e68-9d02-5c17e83b6a49"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitLandedCostInput"},"examples":{"capitalise":{"value":{},"summary":"Committing a landed cost with one £240 freight charge. The commit creates one inventory revaluation."},"twoAccounts":{"value":{},"summary":"Committing a landed cost whose freight and duty charges have different expense accounts. The commit creates one inventory revaluation for each account."}}}}},"summary":"Commit a landed cost","description":"Commits a draft landed cost. The commit does these steps in one request:\n\n1. It checks that the landed cost has at least one receipt and one charge, that its receipts are still committed, and that no charge uses more than is left on its vendor bill line. If the check finds problems, the commit stops, creates no inventory revaluations, and returns all of the problems together.\n2. It creates inventory revaluations for the charges, at least one for each expense account and costing element type.\n3. It commits each inventory revaluation, which changes the cost of the stock.\n4. It records how much of each charge was allocated, in `allocatedAmount`.\n5. It marks the landed cost as committed. The response lists the inventory revaluations in `revaluationIds`.","tags":["inventoryLandedCosts"]}},"/inventory/batch-transactions/{id}":{"get":{"operationId":"getBatchTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBatchTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aBatchReceipt":{"value":{"data":{"id":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"500.00","cost":"3.75","valueDelta":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"}},"summary":"500 units of one batch received on a receipt."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the batch transaction you want to retrieve. Format: UUID.","examples":{"aBatchReceipt":{"value":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f"}}}],"summary":"Retrieve a batch transaction","description":"Retrieves a batch transaction.","tags":["inventoryBatchTransactions"]}},"/inventory/landed-costs/bulk":{"post":{"operationId":"bulkCreateLandedCosts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateLandedCostsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"periodEnd":{"value":{"data":{"created":[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007"}]}},"summary":"Landed costs created as drafts in one request."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_RECEIPTS, NO_CHARGES, RECEIPT_NOT_COMMITTED, VENDOR_BILL_NOT_APPROVED, INVALID_AMOUNT, UNKNOWN_ALLOCATION_MODE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["receiptNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["billNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["receiptNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["billNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["receiptNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["billNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateLandedCostsInput"},"examples":{"periodEnd":{"value":{"landedCosts":[{"entityId":"7039b992-696a-40c7-a181-51759304ef83","receipts":[{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}],"charges":[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"Quantity","amount":"240"}]}]},"summary":"Landed costs created as drafts in one request."}}}}},"summary":"Bulk create landed costs","description":"Creates multiple landed costs as drafts in one request. Each landed cost is checked the same way as on POST inventory/landed-costs. If one landed cost cannot be created, the request fails and no landed costs are created.\n\nNothing is committed. Commit each landed cost with POST inventory/landed-costs/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCosts"]}},"/inventory/serial-numbers/search":{"post":{"operationId":"searchSerialNumbers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSerialNumbersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"onHand":{"value":{"data":{"items":[{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","manufacturerSerialNumber":"MFG-77-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"cost":"250","originalCost":"250","currency":"GBP","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Every unit of one item that is in stock."},"traceOne":{"value":{"data":{"items":[{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","manufacturerSerialNumber":"MFG-77-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"cost":"250","originalCost":"250","currency":"GBP","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"One unit, found by its serial number."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSerialNumbersInput"},"examples":{"onHand":{"value":{"filters":{"itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","inStock":true}},"summary":"Every unit of one item that is in stock."},"traceOne":{"value":{"filters":{"serialNumber":"SN-000418"}},"summary":"One unit, found by its serial number."}}}}},"summary":"Search serial numbers","description":"Searches serial numbers, with their costs.","tags":["inventorySerialNumbers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/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"]}},"/inventory/item-categories/bulk":{"post":{"operationId":"bulkCreateItemCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateItemCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"seedingACategoryTree":{"value":{"data":{"created":[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"},{"id":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8"}]}},"summary":"Two categories created together; match the response to the request by index"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PARENT_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateItemCategoriesInput"},"examples":{"seedingACategoryTree":{"value":{"itemCategories":[{"name":"Hardware","description":"Fasteners, fittings and tooling","idealTurnoverRatio":"6.50"},{"name":"Consumables","idealTurnoverRatio":"12.00"}]},"summary":"Two categories created together; match the response to the request by index"}}}}},"summary":"Bulk create item categories","description":"Creates multiple item categories in one request. Each category in itemCategories takes the same fields as POST inventory/item-categories. If any category can't be created, none are. The response lists the new categories in the order you sent them, each with only its id.\n\nA parentId must name a category that already exists before this request; a category created in the same request has no id yet, so it cannot be a parent here. To seed a tree, create one level per request.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItemCategories"]}},"/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"]}},"/inventory/purchase-returns":{"post":{"operationId":"createPurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, INCOMPLETE_LINE, MISSING_TRACKING_SELECTION, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseReturnInput"}}}},"summary":"Create a purchase return","description":"Creates a purchase return with the `documentStatus` 'DRAFT'. The response contains the whole purchase return.\n\nTo create a purchase return for everything still returnable on a purchase order, use POST inventory/purchase-returns/from-purchase-order.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryPurchaseReturns"]},"get":{"operationId":"purchaseReturns","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryDate]","in":"query","required":false,"description":"Filter deliveryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][ne]","in":"query","required":false,"description":"Filter deliveryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gt]","in":"query","required":false,"description":"Filter deliveryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gte]","in":"query","required":false,"description":"Filter deliveryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lt]","in":"query","required":false,"description":"Filter deliveryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lte]","in":"query","required":false,"description":"Filter deliveryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][in]","in":"query","required":false,"description":"Filter deliveryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][notIn]","in":"query","required":false,"description":"Filter deliveryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][between]","in":"query","required":false,"description":"Filter deliveryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnType]","in":"query","required":false,"description":"Filter returnType (equality)","schema":{"type":"string"}},{"name":"filter[returnType][ne]","in":"query","required":false,"description":"Filter returnType (ne)","schema":{"type":"string"}},{"name":"filter[returnType][gt]","in":"query","required":false,"description":"Filter returnType (gt)","schema":{"type":"string"}},{"name":"filter[returnType][gte]","in":"query","required":false,"description":"Filter returnType (gte)","schema":{"type":"string"}},{"name":"filter[returnType][lt]","in":"query","required":false,"description":"Filter returnType (lt)","schema":{"type":"string"}},{"name":"filter[returnType][lte]","in":"query","required":false,"description":"Filter returnType (lte)","schema":{"type":"string"}},{"name":"filter[returnType][in]","in":"query","required":false,"description":"Filter returnType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][notIn]","in":"query","required":false,"description":"Filter returnType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][between]","in":"query","required":false,"description":"Filter returnType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnType][like]","in":"query","required":false,"description":"Filter returnType (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","deliveryDate","-deliveryDate","documentStatus","-documentStatus","totalAmount","-totalAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","deliveryDate","returnType","entityId","entityName","businessPartnerId","businessPartnerName","referenceNumber","currency","totalAmount","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/purchaseReturnsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List purchase returns","description":"Lists purchase returns, with their header fields only. To get the lines of the purchase returns, or to filter by item or warehouse, use POST inventory/purchase-returns/search.","tags":["inventoryPurchaseReturns"]}},"/inventory/landed-costs/bulk-delete":{"post":{"operationId":"bulkDeleteLandedCosts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteLandedCostsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteLandedCostsInput"}}}},"summary":"Bulk delete landed costs","description":"Deletes multiple draft landed costs in one request, with their receipt selections, charges, and allocation lines. If one landed cost cannot be deleted, the request fails and no landed costs are deleted. The receipts and vendor bills do not change.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCosts"]}},"/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"]}},"/inventory/item-types/{id}":{"get":{"operationId":"getItemType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getItemTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"stocked":{"value":{"data":{"id":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","name":"Stocked good","description":"Physical goods held in a warehouse","procurable":true,"stockable":true,"active":true,"itemCount":42,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"The type most items name"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item type you want to retrieve.","examples":{"stocked":{"value":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16"}}}],"summary":"Retrieve an item type","description":"Retrieves an item type. The item type comes back with itemCount, the number of items that use it. The collection GET inventory/item-types leaves itemCount out. POST inventory/item-types/search returns the same fields as this endpoint.","tags":["inventoryItemTypes"]}},"/inventory/landed-cost-items/bulk-delete":{"post":{"operationId":"bulkDeleteLandedCostItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteLandedCostItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteLandedCostItemsInput"}}}},"summary":"Bulk delete landed cost items","description":"Deletes multiple landed cost items in one request. Each landed cost item is deleted as with DELETE inventory/landed-cost-items/:id. If one landed cost item cannot be deleted, the request fails and no landed cost items are deleted.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCostItems"]}},"/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"]}},"/inventory/shipments/search":{"post":{"operationId":"searchShipments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchShipmentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byTrackingNumber":{"value":{"data":{"items":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}],"pagination":{"hasMore":false}}},"summary":"The shipment behind a carrier tracking number — the support desk's question"},"oneCustomersShipments":{"value":{"data":{"items":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"SHIPPED","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-15T07:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}],"pagination":{"hasMore":false}}},"summary":"Everything sent to one customer this month"},"theInTransitQueue":{"value":{"data":{"items":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}],"pagination":{"hasMore":false}}},"summary":"Every shipment that has left but not yet been delivered"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchShipmentsInput"},"examples":{"byTrackingNumber":{"value":{"filters":{"trackingNumber":"3SABCD1234567"}},"summary":"The shipment behind a carrier tracking number — the support desk's question"},"oneCustomersShipments":{"value":{"filters":{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Everything sent to one customer this month"},"theInTransitQueue":{"value":{"filters":{"documentStatus":"SHIPPED"}},"summary":"Every shipment that has left but not yet been delivered"}}}}},"summary":"Search shipments","description":"Searches shipments. The fields are the same as on GET inventory/shipments/:id.\n\nThis is the only endpoint that filters by customer, item, warehouse, reference number, or tracking number.","tags":["inventoryShipments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/sales-returns/{id}/commit":{"post":{"operationId":"commitSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"acceptTheReturn":{"value":{"data":{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentStatus":"RECEIVED","warnings":[]}},"summary":"The RMA checks out: the goods go back on the shelf and the return is closed"},"creditRaised":{"value":{"data":{"id":"3c81f0a5-9d72-4b6e-8f14-0a5e73c9b2d8","documentStatus":"RECEIVED","creditMemoId":"b7d4e19c-3a62-4f85-9e07-1c2d5a8f6b30","warnings":[]}},"summary":"A return that came from a finance sales return raised as a credit"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. 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 for the sales return.","examples":{"acceptTheReturn":{"value":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"},"creditRaised":{"value":"3c81f0a5-9d72-4b6e-8f14-0a5e73c9b2d8"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitSalesReturnInput"},"examples":{"acceptTheReturn":{"value":{"approvalNotes":"RMA verified against the delivery"},"summary":"The RMA checks out: the goods go back on the shelf and the return is closed"},"creditRaised":{"value":{"approvalNotes":"Customer credited in full"},"summary":"A return that came from a finance sales return raised as a credit"}}}}},"summary":"Commit a sales return","description":"Commits a draft sales return and brings the goods back into stock. The commit creates the inventory transactions and the journal entry for the returned goods, and sets documentStatus to 'RECEIVED'. When the return is linked to a sales return in accounting that credits the customer, the commit also creates the credit memo. creditMemoId is the id of that credit memo.\n\nOnly a draft can be committed. All lines must use the same warehouse, or the request fails with POSTING_REJECTED. After the commit, the return can't be updated or deleted.","tags":["inventorySalesReturns"]}},"/inventory/purchase-returns/{id}/approve":{"post":{"operationId":"approvePurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approvePurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. 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 approve. Format: UUID.","example":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvePurchaseReturnInput"}}}},"summary":"Approve a purchase return","description":"Approves a draft purchase return. Approving checks that the purchase return could be shipped now:\n\n- all its lines use the same warehouse\n- each line's item is an active inventory item\n- the warehouse has each line's quantity in stock\n- no line returns more than is still returnable on the receipt line or purchase order line it draws on","tags":["inventoryPurchaseReturns"]}},"/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"]}},"/inventory/reason-codes/bulk-delete":{"post":{"operationId":"bulkDeleteReasonCodes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteReasonCodesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REASON_CODE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteReasonCodesInput"}}}},"summary":"Bulk delete reason codes","description":"Deletes multiple reason codes in one request. If any reason code can't be deleted, none are deleted. The response lists each deleted reason code's id and code in the order you sent the ids.\n\nA reason code that an inventory increase, inventory decrease, inventory revaluation, purchase return, or sales return still uses can't be deleted. To retire the reason code instead, set isActive to false with PATCH inventory/reason-codes/:id.\n\nTo delete a single reason code, use DELETE inventory/reason-codes/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReasonCodes"]}},"/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"]}},"/inventory/reason-codes/search":{"post":{"operationId":"searchReasonCodes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchReasonCodesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"codesThatGateADocument":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Every active reason code that forces approval"},"codesUsableOnADecrease":{"value":{"data":{"items":[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","code":"DAMAGE","description":"Stock damaged in the warehouse","isActive":true,"requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Populate a reason picker on an inventory decrease — the filter the collection route cannot offer"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchReasonCodesInput"},"examples":{"codesThatGateADocument":{"value":{"filters":{"isActive":true,"requiresApproval":true}},"summary":"Every active reason code that forces approval"},"codesUsableOnADecrease":{"value":{"filters":{"documentType":"InventoryDecrease","isActive":true}},"summary":"Populate a reason picker on an inventory decrease — the filter the collection route cannot offer"}}}}},"summary":"Search reason codes","description":"Searches reason codes. Each matching reason code comes back with documentTypes, the document types it can be selected on. The filters include documentType.\n\nThe collection GET inventory/reason-codes neither returns documentTypes nor filters by document type.","tags":["inventoryReasonCodes"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/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"]}},"/inventory/warehouse-transfers/{id}/commit":{"post":{"operationId":"commitWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"moveTheStock":{"value":{"data":{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentStatus":"COMMITTED","journalEntryId":"6b31d0a7-4e28-4c95-8f13-2a7e0c5d9b64","warnings":[]}},"summary":"A straightforward move between two of one entity's warehouses"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. 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 transfer you want to commit.","examples":{"moveTheStock":{"value":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitWarehouseTransferInput"},"examples":{"moveTheStock":{"value":{},"summary":"A straightforward move between two of one entity's warehouses"}}}}},"summary":"Commit a warehouse transfer","description":"Commits a warehouse transfer. It moves the goods from the source warehouse to the target warehouse, creates a journal entry for the movement, and sets documentStatus to 'COMMITTED'.\n\nThe stock must be available in the source warehouse. Otherwise the request fails with POSTING_REJECTED.\n\nCommitting doesn't create the intercompany bill. To bill an intercompany transfer, use POST inventory/warehouse-transfers/:id/bill.","tags":["inventoryWarehouseTransfers"]}},"/inventory/warehouse-transfers/{id}/bill":{"post":{"operationId":"billWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/billWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"invoiceTheOtherEntity":{"value":{"data":{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","billingStatus":"BILLED","intercompanyBillId":"884213","intercompanyBillNumber":"IC-BILL-1042","warnings":[]}},"summary":"Closing the intercompany payable after the goods have moved"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_BILLABLE, ALREADY_BILLED, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_BILLABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_BILLABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_BILLABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer you want to bill.","examples":{"invoiceTheOtherEntity":{"value":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billWarehouseTransferInput"},"examples":{"invoiceTheOtherEntity":{"value":{},"summary":"Closing the intercompany payable after the goods have moved"}}}}},"summary":"Bill an intercompany transfer","description":"Bills an intercompany transfer. Charges the receiving legal entity (toEntityId) for the goods and sets the transfer's billingStatus to 'BILLED'. Each line is billed at its unitTransferValue, in the transfer's contractualCurrency.\n\nOnly a committed transfer with transferType 'INTERCOMPANY' that has not been billed can be billed. Committing a transfer does not bill it, so use this endpoint after POST inventory/warehouse-transfers/:id/commit.","tags":["inventoryWarehouseTransfers"]}},"/inventory/inventory-increases/{id}/commit":{"post":{"operationId":"commitInventoryIncrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitInventoryIncreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"postTheCount":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":[]}},"summary":"The count correction is posted; stock rises and a journal entry is written"},"postWithASoftBinBreach":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":["Bin A-01-02 exceeds its maximum quantity by 20"]}},"summary":"The destination bin is over its configured limit, but not configured to hard-block, so the commit succeeds with an advisory"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. 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 commit.","examples":{"postTheCount":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"},"postWithASoftBinBreach":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitInventoryIncreaseInput"},"examples":{"postTheCount":{"value":{},"summary":"The count correction is posted; stock rises and a journal entry is written"},"postWithASoftBinBreach":{"value":{},"summary":"The destination bin is over its configured limit, but not configured to hard-block, so the commit succeeds with an advisory"}}}}},"summary":"Commit an inventory increase","description":"Commits an inventory increase. The lines' quantities are added to stock and documentStatus becomes 'COMMITTED'. The response includes journalEntryId and any warnings.\n\nOnly a draft can be committed. Tracking, bin requirements, and bin capacity are checked when you commit, and a failed check returns POSTING_REJECTED. A committed inventory increase can't be changed or deleted, and no endpoint cancels it.\n\nCommits of the same item at the same location may run at the same time. A database write conflict between them is not a rejection: the platform retries the request, so it never returns POSTING_REJECTED.","tags":["inventoryInventoryIncreases"]}},"/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/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/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"]}},"/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"]}}},"servers":[{"url":"https://{tenant}/public/api/lensing","variables":{"tenant":{"default":"your-tenant-host","description":"The host of your own tenant — every request goes there."}}}],"webhooks":{"accounting/invoices/created":{"post":{"operationId":"accounting_invoices_created","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/invoices/created","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_invoices_createdPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/invoices/created","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"An invoice was issued.","description":"Delivered once the invoice, its lines, its journal entry, and any customer credit applied automatically have all settled, so the invoice is complete and readable when this arrives.\n\nIt fires however the invoice came about: a scheduled, manual, or ad-hoc billing run, an import with POST accounting/invoices/import, milestone invoicing, a credit-and-rebill, a subscription cancellation, or a load from an external system. A billing run issues many invoices and sends one event for each, so expect bursts.\n\nInvoices brought in by a one-time historical migration do **not** publish this event. They record invoices that were issued, sent, and usually settled long ago in another system, so treating them as newly issued would trigger work that has already happened. Load that history from the invoicing read API instead.\n\nIf your own integration wrote the invoice, you will receive an event for it. Filter those out using the invoice's data source or its external identifier.\n\nA delivery may be retried, so deduplicate on `event.uuid`, the id of the emission itself. Do not confuse it with `event.data.id`, which is the invoice: one invoice produces many emissions over its life.","tags":["accountingInvoices"]}},"accounting/invoices/updated":{"post":{"operationId":"accounting_invoices_updated","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/invoices/updated","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_invoices_updatedPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/invoices/updated","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"An invoice changed after it was issued.","description":"Delivered whenever something about the invoice changes after it is issued: an edit to its header or lines, a payment applied to it, a credit memo applied to it, the invoice being emailed, delivered, failed or opened, and a chargeback dispute opening or resolving.\n\nThis is a change notification rather than a description of the change. The payload names the invoice but not what changed about it, and there is no before-and-after, so re-read the invoice and take its current amounts and status from there. A subscriber that needs a diff keeps its own last-known copy, because the delivery cannot supply one.\n\nThere are deliberately no separate events for payment, credit, delivery or dispute. To tell those apart, compare what you read against your last-known copy: the invoice's status, amount due, delivery status and dispute state are all readable. More specific events can be added later without breaking this one.\n\nSeveral changes in quick succession are several deliveries, and a re-read after the first may already show the last. Deduplicate on `event.uuid`, the id of the emission itself, and do that before anything with a financial side effect. Take balances from a read rather than from adding up events.\n\nInvoices touched by a one-time historical migration do not publish this event, the same as `accounting/invoices/created`.","tags":["accountingInvoices"]}},"accounting/journalEntries/created":{"post":{"operationId":"accounting_journalEntries_created","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/journalEntries/created","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_journalEntries_createdPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/journalEntries/created","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"b41d7e02-9c58-4a63-8f17-3ea5c02d9b41"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A journal entry was created.","description":"Delivered when the entry is created. The entry is published as soon as its header exists, which is BEFORE its lines are written, so a read immediately on delivery may show an entry whose lines are still landing. Read it again if the lines matter to you, and take the entry's current state from the read rather than from the moment of delivery.\n\n**Expect volume.** A journal entry is created for every posting in the system, and one is created per accounting book the entity keeps. A billing run of ten thousand invoices across two books publishes twenty thousand of these. Month-end close is the opposite shape: fewer entries, each carrying hundreds of lines. Size your subscriber for both, and remember that delivery is at-least-once and unordered.\n\nSources include every document that posts to the ledger: invoices and their late fees, payments and their applications, credit and debit memos, refunds and chargebacks, vendor bills and credits, expense reports, bank and credit card entries, fund transfers, payroll, inventory movements, amortization, depreciation, revenue recognition and the other close steps, currency revaluation, allocations, and manual entries created in the app or through the API.\n\nA reversal is itself a new journal entry, so reversing an entry publishes this event for the reversal and `accounting/journalEntries/updated` for the original.\n\nEntries still being drafted publish nothing, and neither do the drafts that are later discarded.\n\nThe payload carries the identifier only. Read the entry for its book, posting date, status, lines and source document; a delivery may be retried, so deduplicate on `event.uuid`, the id of the emission itself, not on `event.data.id`, which is the entry.","tags":["accountingJournalEntries"]}},"accounting/journalEntries/deleted":{"post":{"operationId":"accounting_journalEntries_deleted","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/journalEntries/deleted","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_journalEntries_deletedPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/journalEntries/deleted","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"b41d7e02-9c58-4a63-8f17-3ea5c02d9b41"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A journal entry was deleted.","description":"Delivered once the entry has been removed. The identifier is resolved before the row disappears and published after it is gone, so nothing is announced that the delete then failed to do — but by the time this arrives the entry can no longer be read. Use it to drop the entry from a cache, an index or a downstream mirror.\n\nThis is the rare one. Posted entries are normally cancelled by voiding or reversing, not deleting, and deletion is refused for an approved entry, for a closed posting period, and where amortization schedules have already started. In practice it happens for unapproved manual entries and as a cascade when the source document is deleted.\n\nEntries discarded while still drafts publish nothing, the same as they published nothing when created.\n\nIf you need to know what was deleted rather than only that it was, keep the last-known copy from the created and updated events, this delivery carries the identifier alone.","tags":["accountingJournalEntries"]}},"accounting/journalEntries/updated":{"post":{"operationId":"accounting_journalEntries_updated","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/journalEntries/updated","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_journalEntries_updatedPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/journalEntries/updated","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"b41d7e02-9c58-4a63-8f17-3ea5c02d9b41"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A journal entry changed.","description":"Delivered whenever an existing entry changes. That covers rather a lot: approval and posting, rejection, voiding, being stamped as reversed when its reversal posts, and an edit to its header or its lines.\n\nLine edits reach you for a slightly indirect reason worth knowing: an entry's lines are always rewritten together with the entry itself, so a change to a line is reported through the entry's own record rather than through the line. The effect is the same — you get a delivery — but it means the volume stays one event per edit rather than one per line, which matters for month-end entries carrying hundreds of them.\n\nTwo things are NOT reported. An attachment added or removed publishes nothing, and it would not be observable anyway — attachments are not part of this resource. And the `reportingTags` on a line are resolved from value-accounting records held elsewhere, so editing an allocation can change what a line returns without a delivery; read the entry on a schedule if you depend on its tags.\n\nThis is a change notification rather than a description of the change. Re-read the entry and take its current status, approval status and reversal status from there; the payload names the entry but not what moved, and there is no before-and-after.\n\nTwo things are worth knowing when you re-read. An entry's lines are reconciled by deleting and recreating them, so line identifiers are not stable across an update and should not be used as durable keys. And voiding does not remove an entry: its status becomes voided and the row stays, which is what cancelling a posting means here.\n\nSeveral changes in quick succession are several deliveries, and a re-read after the first may already show the last. Deduplicate on `event.uuid` and treat the read as the source of truth.","tags":["accountingJournalEntries"]}},"hr/people/created":{"post":{"operationId":"hr_people_created","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"hr/people/created","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/hr_people_createdPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"hr/people/created","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"3f1c9b74-2a55-4de1-9c0e-5b7d81af6e23"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A person was added.","description":"Delivered when a person record is created, whether through POST people/person, the create-employee flow in the app, or an integration syncing people from a payroll or HR system.\n\nA person is created together with their first job, so this event is normally followed by one or more `hr/people/updated` for the same business action. Both describe the same new person; read the person back and take the current state from there.\n\nIt fires for people whose employment has not started yet as well as for those already working: read `status` and `startDate` rather than assuming a new person is employed today.\n\nThe payload carries the identifier only. Read the person for names, employment dates, job, compensation and external identifiers.\n\nThere is no deleted event, and none is missing: people are never removed. Employment ends by setting `endDate` and `status`, which arrives as an update with the person still readable.\n\nA delivery may be retried, so deduplicate on `event.uuid`, the id of the emission itself. Do not confuse it with `event.data.id`, which is the person.","tags":["hrPeople"]}},"hr/people/updated":{"post":{"operationId":"hr_people_updated","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"hr/people/updated","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/hr_people_updatedPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"hr/people/updated","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"3f1c9b74-2a55-4de1-9c0e-5b7d81af6e23"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A person changed.","description":"Delivered when the person's own employment record changes — status, start, end and probation dates, employment category, entity, location and custom fields; when their primary job changes, which is what moves `jobId`, `departmentName`, `positionName` and `managerName`; when their compensation changes; and when an external identifier is added, changed or removed.\n\n`firstName`, `lastName`, `middleName`, the preferred names, `name` and `email` are held on a separate person record and projected onto the employment record rather than stored on it. A write to either record publishes this event, so a rename arrives however it was made.\n\nThis is a change notification rather than a description of the change. The payload names the person but not what moved, and there is no before-and-after, so re-read and take the current state from there.\n\nChanges to what the person merely references are not reported: the department, position and manager behind `departmentName`, `positionName` and `managerName` are their own records, as are the entity, the location, the employment category and the compensation type. Renaming any of them changes what this API returns but publishes nothing, because the person did not change.\n\nExpect more than one delivery for a single business action — assigning a job and setting a salary are separate writes to the same person — and a re-read after the first may already show the last. Deduplicate on `event.uuid` and treat the read as the source of truth.","tags":["hrPeople"]}}},"components":{"schemas":{"allocationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the allocation."},"startDate":{"type":"string","format":"date","description":"The first day of the allocation period, inclusive. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the allocation period, inclusive. Format YYYY-MM-DD."},"totalHours":{"type":"string","format":"decimal","description":"The total planned hours for the allocation period."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes about the allocation."},"method":{"type":"string","description":"The distribution method for the planned hours. Possible values: 'totalHours', 'hoursPerDay', 'hoursPerWeek', 'hoursPerMonth'."},"memberId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the PSA team-member assignment the allocation is booked against. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"employeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the employee for the allocated team member. It is a numeric key, and there is no public endpoint for an employee."},"projectActivityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the project activity the allocation is against. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"projectPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the project position the allocation is against. It is a numeric key, not the UUID that GET psa/positions/:id takes."},"psaProjectId":{"type":"number","description":"The id of the PSA project the allocation belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes."},"memberName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the allocated team member."},"memberPlaceholderName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the placeholder, when the allocation is to a placeholder rather than an employee."},"projectActivityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the project activity."},"projectPositionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the project position."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the allocation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateTimeEntriesOutput":{"type":"object","properties":{},"additionalProperties":false},"updateTimeEntriesInput":{"type":"object","properties":{"timeEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the time entry to update."},"hours":{"type":"string","format":"decimal","description":"New total hours for the entry. Omit to leave it unchanged."},"notes":{"type":"string","description":"New free-form notes. Omit to leave them unchanged, or pass an empty string to clear them."}},"additionalProperties":false,"required":["id"]},"description":"The time entries to update.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","hours":"7.5"}]]}},"additionalProperties":false,"required":["timeEntries"]},"fixedFeesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed fee.","examples":["7c2e1b90-4a53-4f16-8de2-9b1035c7ef42"]},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The fixed fee amount, in the currency given by currency.","examples":["5000.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billing frequency of the fixed fee. Possible values: 'Monthly', 'BiMonthly', 'Quarterly', 'SemiAnnually', 'Annually', 'Once'.","examples":["Monthly"]},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the fixed fee's billing period, inclusive. Format YYYY-MM-DD.","examples":["2026-01-01"]},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the fixed fee's billing period, inclusive. Format YYYY-MM-DD.","examples":["2026-12-01"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this fixed fee belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"salesOrderProductLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the sales order product line this fixed fee fulfills. It is a numeric key. There is no endpoint for it.","examples":[8812]},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product this fixed fee is associated with. It is a numeric key, not the UUID that GET accounting/products/:id takes.","examples":[1001]},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line this fixed fee is associated with. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes.","examples":[201]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the fixed fee record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"projectTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the project type.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"name":{"type":"string","description":"The display name of the project type.","examples":["Retainer"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the project type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"restorePsaProjectsOutput":{"type":"object","properties":{},"additionalProperties":false},"restorePsaProjectsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the archived projects to restore. If any id does not match, nothing is restored.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]]}},"additionalProperties":false,"required":["ids"]},"getExpensesSummaryOutput":{"type":"object","properties":{"expenses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier for the expense entry."},"expenseReportId":{"type":"number","description":"The id of the expense report this expense belongs to. It is a numeric key, not the UUID that GET accounting/expense-reports/:id takes."},"employeeName":{"type":"string","description":"The name of the employee who incurred the expense."},"categoryName":{"type":"string","description":"The name of the expense category."},"amount":{"type":"string","format":"decimal","description":"The gross amount of the expense, in the currency given by amountCurrency."},"amountCurrency":{"type":"string","description":"The currency of amount. Format ISO 4217, for example 'USD'."},"reimbursableNetAmount":{"type":"string","format":"decimal","description":"The reimbursable net amount of the expense, after tax and any company-paid portions, in the currency given by reimbursableNetAmountCurrency."},"reimbursableNetAmountCurrency":{"type":"string","description":"The currency of reimbursableNetAmount. Format ISO 4217, for example 'USD'."},"status":{"type":"string","description":"The status of the expense entry."},"notes":{"type":"string","description":"Free-form notes on the expense."},"billDate":{"type":"string","format":"date","description":"The date the expense was incurred. Format YYYY-MM-DD."},"billableExpense":{"type":"string","description":"The billable classification of the expense."},"expenseReportNumber":{"type":"string","description":"The human-readable number of the expense report."}},"additionalProperties":false},"description":"The expense entries on this page, each linked to the project through its assigned budget.","examples":[[{"id":88213,"employeeName":"Priya Natarajan","categoryName":"Airfare","amount":"412.50","amountCurrency":"USD","status":"Approved","billDate":"2026-07-02"}]]},"budgetMappings":{"type":"array","items":{"type":"object","properties":{"expenseItemBaseId":{"type":"number","description":"The id of the expense this mapping is for. It matches an id in the expenses array of this response."},"expenseBudgetId":{"type":"number","description":"The id of the budget this expense is mapped to. It matches an id in the expenseBudgets array of this response."},"name":{"type":"string","description":"The display name of the budget."},"budget":{"type":"string","format":"decimal","description":"The budget amount, in the currency given by currency. Absent when the budget has no amount."},"currency":{"type":"string","description":"The currency of budget. Format ISO 4217, for example 'USD'. Absent when the budget has no amount."},"isDefault":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this is the project's default catch-all budget."},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether expenses against this budget are billable to the customer."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product tied to this budget. It is a numeric key, not the UUID that GET accounting/products/:id takes. Absent when the budget is not tied to a product."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line tied to this budget. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes. Absent when the budget is not tied to a product line."},"salesOrderId":{"type":"number","description":"The id of the sales order this budget bills against. It is a numeric key, not the UUID that GET accounting/sales-orders/:id takes."}},"additionalProperties":false,"required":["expenseItemBaseId","expenseBudgetId","name"]},"description":"The mapping of each expense on this page to its assigned budget. It covers only the expenses in this page's expenses array.","examples":[[{"expenseItemBaseId":88213,"expenseBudgetId":501,"name":"Travel","budget":"10000.00","currency":"USD"}]]},"expenseBudgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier for the budget."},"name":{"type":"string","description":"The display name of the budget."},"budget":{"type":"string","format":"decimal","description":"The budget amount, in the currency given by currency. Absent when the budget has no amount."},"currency":{"type":"string","description":"The currency of budget. Format ISO 4217, for example 'USD'. Absent when the budget has no amount."},"isDefault":{"type":"boolean","description":"Whether this is the project's default catch-all budget."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the budget definition last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether expenses against this budget are billable to the customer."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product tied to this budget. It is a numeric key, not the UUID that GET accounting/products/:id takes. Absent when the budget is not tied to a product."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line tied to this budget. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes. Absent when the budget is not tied to a product line."},"salesOrderId":{"type":"number","description":"The id of the sales order this budget bills against. It is a numeric key, not the UUID that GET accounting/sales-orders/:id takes."}},"additionalProperties":false,"required":["id","name","isDefault"]},"description":"Every budget defined for the project. This array is never paginated.","examples":[[{"id":501,"name":"Travel","budget":"10000.00","currency":"USD","isDefault":false,"lastModifiedDate":"2026-07-02T09:14:22.000Z"}]]},"defaultBudget":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier for the budget."},"name":{"type":"string","description":"The display name of the budget."},"budget":{"type":"string","format":"decimal","description":"The budget amount, in the currency given by currency. Absent when the budget has no amount."},"currency":{"type":"string","description":"The currency of budget. Format ISO 4217, for example 'USD'. Absent when the budget has no amount."},"isDefault":{"type":"boolean","description":"Always true, because this is the default budget."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the budget definition last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether expenses against this budget are billable to the customer."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product tied to this budget. It is a numeric key, not the UUID that GET accounting/products/:id takes. Absent when the budget is not tied to a product."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line tied to this budget. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes. Absent when the budget is not tied to a product line."},"salesOrderId":{"type":"number","description":"The id of the sales order this budget bills against. It is a numeric key, not the UUID that GET accounting/sales-orders/:id takes."}},"additionalProperties":false,"required":["id","name","isDefault"],"description":"The project's default catch-all budget for expenses with no explicit mapping. Absent when the project has no default budget."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the pageCursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more expenses remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for the expenses array.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["expenses","budgetMappings","expenseBudgets","pagination"]},"getPlaceholderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the placeholder.","examples":["3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"]},"name":{"type":"string","description":"The display name of the placeholder, for example 'Unassigned Backend Engineer'. Unique within the tenant.","examples":["Unassigned Backend Engineer"]},"weeklyWorkingHours":{"type":"string","format":"decimal","description":"The weekly working hours used for planning, as a non-negative number of hours, for example 40.00. Absent when none was set.","examples":["40.00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the placeholder last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.184Z"]}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"milestonesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the milestone.","examples":["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the milestone.","examples":["Phase 1 delivery"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the milestone.","examples":["Signed off by the customer's PMO."]},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The milestone amount, in the currency given by currency.","examples":["15000.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the milestone is due for completion. Format YYYY-MM-DD.","examples":["2026-09-30"]},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the milestone. Possible values: 'pending', 'accomplished', 'invoiced'.","examples":["pending"]},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the milestone is billable to a customer.","examples":[true]},"psaProjectId":{"type":"number","description":"The id of the PSA project this milestone belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"invoiceId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the invoice this milestone has been billed on. Absent when the milestone has not been invoiced. It is a numeric key, not the UUID that GET accounting/invoices/:id takes."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product this milestone is associated with. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line this milestone is associated with. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the milestone record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"teamMembersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team-roster row."},"psaProjectId":{"type":"number","description":"The id of the PSA project this record belongs to. It is a numeric key you can filter on here, not the UUID that GET psa/projects/:id takes."},"employeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the employee this roster record is for. It is a numeric key, not a UUID any public endpoint returns as a fetchable id."},"isTeamLead":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this team member is the team lead."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of this person's membership of the team. Format YYYY-MM-DD. Absent when not set."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of this person's membership of the team. Format YYYY-MM-DD. Absent when not set."},"allocation":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The share of the person's capacity allocated to this team, as a percentage. For example, 50 means 50%."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the team member. It is returned but cannot be filtered or sorted on, and there is no endpoint to find a member by name."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The preferred display name of the team member. Like name, it cannot be filtered or sorted on."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time this roster row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getAllocationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the allocation.","examples":["6f3c1f0e-6a2b-4d5e-9c11-2b7a8e4d0f13"]},"startDate":{"type":"string","format":"date","description":"The first day of the allocation period, inclusive. Format YYYY-MM-DD.","examples":["2026-08-03"]},"endDate":{"type":"string","format":"date","description":"The last day of the allocation period, inclusive. Format YYYY-MM-DD.","examples":["2026-08-14"]},"totalHours":{"type":"string","format":"decimal","description":"The total planned hours for the allocation period.","examples":["40.00"]},"notes":{"type":"string","description":"Free-form notes about the allocation."},"method":{"type":"string","description":"The distribution method for the planned hours. Possible values: 'totalHours', 'hoursPerDay', 'hoursPerWeek', 'hoursPerMonth'.","examples":["totalHours"]},"memberId":{"type":"number","description":"The id of the PSA team-member assignment the allocation is booked against. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"employeeId":{"type":"number","description":"The id of the employee for the allocated team member. It is a numeric key, and there is no public endpoint for an employee."},"projectActivityId":{"type":"number","description":"The id of the project activity the allocation is against. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"projectPositionId":{"type":"number","description":"The id of the project position the allocation is against. It is a numeric key, not the UUID that GET psa/positions/:id takes."},"psaProjectId":{"type":"number","description":"The id of the PSA project the allocation belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"memberName":{"type":"string","description":"The name of the allocated team member."},"memberPlaceholderName":{"type":"string","description":"The name of the placeholder, when the allocation is to a placeholder rather than an employee."},"projectActivityName":{"type":"string","description":"The name of the project activity."},"projectPositionName":{"type":"string","description":"The name of the project position."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the allocation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.421Z"]}},"additionalProperties":false,"required":["id","startDate","endDate","totalHours","method","psaProjectId","lastModifiedDate"]},"updateProjectTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"updateProjectTypeInput":{"type":"object","properties":{"name":{"type":"string","description":"A new display name for the project type. It must be unique across the tenant. A name another project type already uses fails with DUPLICATE_NAME.","examples":["Retainer (Annual)"]}},"additionalProperties":false},"getTeamMemberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team-roster row.","examples":["5f2e1c40-9a3b-4d71-8e05-6b4c2d1a7f93"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this record belongs to. It is a numeric key you can filter on here, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"employeeId":{"type":"number","description":"The id of the employee this roster record is for. It is a numeric key, not a UUID any public endpoint returns as a fetchable id.","examples":[3845142]},"isTeamLead":{"type":"boolean","description":"Whether this team member is the team lead.","examples":[false]},"startDate":{"type":"string","format":"date","description":"The first day of this person's membership of the team. Format YYYY-MM-DD. Absent when not set.","examples":["2026-01-06"]},"endDate":{"type":"string","format":"date","description":"The last day of this person's membership of the team. Format YYYY-MM-DD. Absent when not set.","examples":["2026-12-31"]},"allocation":{"type":"string","format":"decimal","description":"The share of the person's capacity allocated to this team, as a percentage. For example, 50 means 50%.","examples":["50"]},"name":{"type":"string","description":"The full name of the team member. It is returned but cannot be filtered or sorted on, and there is no endpoint to find a member by name.","examples":["Alex Moreau"]},"displayName":{"type":"string","description":"The preferred display name of the team member. Like name, it cannot be filtered or sorted on.","examples":["Alex"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this roster row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","employeeId","lastModifiedDate"]},"teamMemberPositionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position assignment."},"psaProjectId":{"type":"number","description":"The id of the PSA project this record belongs to. It is a numeric key you can filter on here, not the UUID that GET psa/projects/:id takes."},"projectPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the project position this assignment fills. It is a numeric key you can filter on here, not the UUID that GET psa/positions/:id takes."},"positionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the project position, paired with projectPositionId. It is returned but cannot be filtered or sorted on, and there is no endpoint to find an assignment by position name."},"teamMemberId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the assigned person's team-roster record. Absent for placeholder-only assignments. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"placeholderId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the placeholder filling this position, when it is filled by a placeholder rather than a person. It is a numeric key, not the UUID that GET psa/placeholders/:id takes."},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this assignment's work has been invoiced. An invoiced assignment cannot be deleted."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time this assignment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getProjectTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the project type.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"name":{"type":"string","description":"The display name of the project type.","examples":["Retainer"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the project type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","name"]},"deletePsaProjectOutput":{"type":"object","properties":{},"additionalProperties":false},"rejectTimeEntriesOutput":{"type":"object","properties":{"rejected":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entry."}},"additionalProperties":false,"required":["id"]},"description":"The entries whose status was set to rejected.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}]]}},"additionalProperties":false,"required":["rejected"]},"rejectTimeEntriesInput":{"type":"object","properties":{"timeEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the time entry to reject."},"rejectionReason":{"type":"string","description":"The reason for rejection. Only the value on the first entry is used, and it overwrites the notes field of every rejected entry."}},"additionalProperties":false,"required":["id","rejectionReason"]},"description":"The time entries to reject.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","rejectionReason":"Hours exceed activity budget."}]]}},"additionalProperties":false,"required":["timeEntries"]},"getTimeEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the time entry.","examples":["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]},"date":{"type":"string","format":"date","description":"The date the time was logged for. Format YYYY-MM-DD.","examples":["2026-08-10"]},"hours":{"type":"string","format":"decimal","description":"The total hours logged in this entry.","examples":["8"]},"billableHours":{"type":"string","format":"decimal","description":"The hours classified as billable to a customer, derived from projectActivityCategory.","examples":["8"]},"nonBillableHours":{"type":"string","format":"decimal","description":"The hours classified as non-billable to a customer, derived from projectActivityCategory."},"internalValuableHours":{"type":"string","format":"decimal","description":"The hours classified as internal valuable work, derived from projectActivityCategory."},"internalNonValuableHours":{"type":"string","format":"decimal","description":"The hours classified as internal non-valuable work, derived from projectActivityCategory."},"invoicedHours":{"type":"string","format":"decimal","description":"The hours that have been invoiced, a subset of billableHours."},"revenue":{"type":"string","format":"decimal","description":"The revenue from this time entry, in the currency given by currency.","examples":["1250.00"]},"cost":{"type":"string","format":"decimal","description":"The cost of this time entry, in the currency given by currency.","examples":["800.00"]},"currency":{"type":"string","description":"The currency of revenue and cost. Format ISO 4217, for example 'USD'. It is the currency of the project position's bill rate.","examples":["USD"]},"notes":{"type":"string","description":"Free-form notes on the time entry."},"submissionStatus":{"type":"string","description":"The submission and approval status of the entry. Possible values: 'draft', 'pending', 'approved', 'rejected', 'submittedForInvoicing', 'invoiced'.","examples":["draft"]},"submissionDate":{"type":"string","format":"date","description":"The date the entry was submitted for approval. Format YYYY-MM-DD."},"month":{"type":"string","format":"date","description":"The first day of the month the entry is reported under. Format YYYY-MM-DD.","examples":["2026-08-01"]},"memberId":{"type":"number","description":"The numeric key of the PSA member assignment the time was logged for. GET psa/team-members/:id takes the member's UUID, not this key, so it cannot fetch the member.","examples":[5001]},"memberEmployeeId":{"type":"number","description":"The numeric key of the employee who logged the time. There is no endpoint for it.","examples":[3845142]},"memberEmployeeName":{"type":"string","description":"The name of the employee who logged the time.","examples":["Alex Rivera"]},"projectActivityId":{"type":"number","description":"The numeric key of the activity the time was logged against. GET psa/activities/:id takes the activity's UUID, not this key, so it cannot fetch the activity.","examples":[7001]},"projectActivityName":{"type":"string","description":"The name of the activity the time was logged against."},"projectActivityCategory":{"type":"string","description":"The billability category of the activity the time was logged against. The billable, non-billable and internal-hour fields are derived from it. See category on GET psa/activities/:id.","examples":["ClientBillable"]},"projectPositionId":{"type":"number","description":"The numeric key of the position the time was logged against. GET psa/positions/:id takes the position's UUID, not this key, so it cannot fetch the position."},"projectPositionName":{"type":"string","description":"The name of the position the time was logged against."},"psaProjectId":{"type":"number","description":"The numeric key of the PSA project the entry belongs to. GET psa/projects/:id takes the project's UUID, not this key, so it cannot fetch the project.","examples":[32341]},"projectName":{"type":"string","description":"The name of the PSA project the entry belongs to."},"psaProjectStatus":{"type":"string","description":"The status of the PSA project this entry belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id"]},"deleteAllocationsOutput":{"type":"object","properties":{},"additionalProperties":false},"deleteAllocationsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the allocations to delete. The call is all-or-nothing: if any identifier matches no allocation, nothing is deleted.","examples":[["3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13","b7c40e29-1af6-42d8-8e55-6d3b9c018a74"]]}},"additionalProperties":false,"required":["ids"]},"getExpenseBudgetsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier for the budget."},"name":{"type":"string","description":"The display name of the budget."},"budget":{"type":"string","format":"decimal","description":"The budget amount, in the currency given by currency. Absent when the budget has no amount."},"currency":{"type":"string","description":"The currency of budget. Format ISO 4217, for example 'USD'. Absent when the budget has no amount."},"isDefault":{"type":"boolean","description":"Whether this is the project's default catch-all budget."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the budget definition last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"billable":{"type":"boolean","description":"Whether expenses against this budget are billable to the customer."},"productId":{"type":"number","description":"The id of the product tied to this budget. It is a numeric key, not the UUID that GET accounting/products/:id takes. Absent when the budget is not tied to a product."},"productLineId":{"type":"number","description":"The id of the product line tied to this budget. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes. Absent when the budget is not tied to a product line."},"salesOrderId":{"type":"number","description":"The id of the sales order this budget bills against. It is a numeric key, not the UUID that GET accounting/sales-orders/:id takes."}},"additionalProperties":false,"required":["id","name","isDefault"]},"description":"The project's budgets on this page. An empty array when the project has no budgets.","examples":[[{"id":501,"name":"Travel","budget":"10000.00","currency":"USD","isDefault":false,"billable":true,"lastModifiedDate":"2026-07-02T09:14:22.000Z"},{"id":502,"name":"General","budget":"5000.00","currency":"USD","isDefault":true,"lastModifiedDate":"2026-06-18T11:02:47.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more budgets remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"assignEmployeesToPlaceholdersOutput":{"type":"object","properties":{"assigned":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resulting position assignment. This is the id GET psa/team-member-positions returns."}},"additionalProperties":false,"required":["id"]},"description":"The ids of the position assignments now held by the employee. A placeholder assignment merged into one the employee already held is removed and contributes no id, so this can be shorter than the input. Read a record back with GET psa/team-member-positions/:id.","examples":[[{"id":"5f2e1c40-9a3b-4d71-8e05-6b4c2d1a7f93"}]]}},"additionalProperties":false,"required":["assigned"]},"assignEmployeesToPlaceholdersInput":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"number","description":"The employee taking over the placeholder's assignments. They are added to the team if not already a member. It is a numeric key."},"placeholderId":{"type":"number","description":"The placeholder being replaced. It is a numeric key."},"psaProjectId":{"type":"number","description":"The PSA project the placeholder belongs to. Needs edit permission on this project. It is a numeric key, not the UUID that GET psa/projects/:id takes."}},"additionalProperties":false,"required":["employeeId","placeholderId","psaProjectId"]},"description":"One entry per placeholder-to-employee conversion. Each entry re-points the placeholder's position assignments to the employee.","examples":[[{"employeeId":3845142,"placeholderId":91,"psaProjectId":32341}]]}},"additionalProperties":false,"required":["assignments"]},"updateAllocationsOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAllocationsInput":{"type":"object","properties":{"allocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the allocation to update. The call is all-or-nothing: if any identifier matches no allocation, nothing is updated."},"memberId":{"type":"number","description":"A new timetracking member assignment to book the allocation against. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"projectActivityId":{"type":"number","description":"A new project activity for the allocation. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"startDate":{"type":"string","format":"date","description":"A new first day of the allocation period, inclusive. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"A new last day of the allocation period, inclusive. Use format YYYY-MM-DD."},"totalHours":{"type":"string","format":"decimal","description":"New planned hours, interpreted according to method as on create. Changing this regenerates the allocation's daily entries."},"method":{"enum":["totalHours","hoursPerDay","hoursPerWeek","hoursPerMonth"],"description":"The distribution method for the planned hours."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes stored on the allocation."},"workingDays":{"anyOf":[{"type":"array","items":{"enum":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},{"type":"null"}],"description":"The days of the week the allocation applies to."},"psaProjectId":{"type":"number","description":"The PSA project of the allocation. It's ignored on update, because an allocation can't change project. It's a numeric key, not the UUID that GET psa/projects/:id takes."},"memberEmployeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The employee on the allocation. It's ignored on update. To reassign the allocation, send memberId."},"memberPlaceholderId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The placeholder on the allocation. It's ignored on update. To reassign the allocation, send memberId."}},"additionalProperties":false,"required":["id"]},"description":"The allocations to update.","examples":[[{"id":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13","totalHours":"32.00"},{"id":"b7c40e29-1af6-42d8-8e55-6d3b9c018a74","memberId":51204,"projectActivityId":8317,"startDate":"2026-09-01","endDate":"2026-11-30","totalHours":"160.00","method":"hoursPerWeek","notes":"Rescoped after the change order.","workingDays":["Monday","Tuesday","Wednesday","Thursday"],"memberEmployeeId":3889611,"psaProjectId":32341}]]}},"additionalProperties":false,"required":["allocations"]},"getTeamMemberPositionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position assignment.","examples":["c81b0a52-7de4-4f16-9b32-0a5e8c7d4126"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this record belongs to. It is a numeric key you can filter on here, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"projectPositionId":{"type":"number","description":"The id of the project position this assignment fills. It is a numeric key you can filter on here, not the UUID that GET psa/positions/:id takes.","examples":[7]},"positionName":{"type":"string","description":"The name of the project position, paired with projectPositionId. It is returned but cannot be filtered or sorted on, and there is no endpoint to find an assignment by position name.","examples":["Senior Consultant"]},"teamMemberId":{"type":"number","description":"The id of the assigned person's team-roster record. Absent for placeholder-only assignments. It is a numeric key, not the UUID that GET psa/team-members/:id takes.","examples":[4401]},"placeholderId":{"type":"number","description":"The id of the placeholder filling this position, when it is filled by a placeholder rather than a person. It is a numeric key, not the UUID that GET psa/placeholders/:id takes."},"invoiced":{"type":"boolean","description":"Whether this assignment's work has been invoiced. An invoiced assignment cannot be deleted.","examples":[false]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this assignment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"createProjectTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created project type.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createProjectTypeInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the project type. It must be unique across the tenant. A name another project type already uses fails with DUPLICATE_NAME.","examples":["Retainer"]}},"additionalProperties":false,"required":["name"]},"getFixedFeeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed fee.","examples":["7c2e1b90-4a53-4f16-8de2-9b1035c7ef42"]},"amount":{"type":"string","format":"decimal","description":"The fixed fee amount, in the currency given by currency.","examples":["5000.00"]},"currency":{"type":"string","description":"The currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"frequency":{"type":"string","description":"The billing frequency of the fixed fee. Possible values: 'Monthly', 'BiMonthly', 'Quarterly', 'SemiAnnually', 'Annually', 'Once'.","examples":["Monthly"]},"startDate":{"type":"string","format":"date","description":"The first day of the fixed fee's billing period, inclusive. Format YYYY-MM-DD.","examples":["2026-01-01"]},"endDate":{"type":"string","format":"date","description":"The last day of the fixed fee's billing period, inclusive. Format YYYY-MM-DD.","examples":["2026-12-01"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this fixed fee belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"salesOrderProductLineId":{"type":"number","description":"The id of the sales order product line this fixed fee fulfills. It is a numeric key. There is no endpoint for it."},"productId":{"type":"number","description":"The id of the product this fixed fee is associated with. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"type":"number","description":"The id of the product line this fixed fee is associated with. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fixed fee record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id","psaProjectId","lastModifiedDate"]},"listCustomDimensionValuesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension this value belongs to. Always 'custom' on this endpoint."},"modelId":{"type":"number","description":"The numeric id of the value record, stored internally on a journal entry's allocation line."},"modelUuid":{"type":"string","description":"The unique identifier for the value record. Pass it as modelUuid to POST base/reporting-tags/resolve, paired with dimensionCode 'custom'."},"name":{"type":"string","description":"The display name of the value."},"isActive":{"type":"boolean","description":"Whether the value is currently active and can be assigned to new transactions."},"customDimensionUuid":{"type":"string","description":"The unique identifier for the custom dimension this value belongs to. It is the same identifier given in the path."},"dimensionName":{"type":"string","description":"The display name of the parent custom dimension."}},"additionalProperties":false,"required":["dimensionCode","modelId","modelUuid","name","isActive"]},"description":"The values on this page. An empty array when the dimension holds none. A dimension identifier that matches nothing fails with NOT_FOUND instead."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more values remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"listCustomDimensionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"customDimensionUuid":{"type":"string","description":"The unique identifier for the custom value dimension. It is the customDimensionUuid on a 'custom' row from POST base/reporting-tags/resolve."},"name":{"type":"string","description":"The display name of the custom dimension."}},"additionalProperties":false,"required":["customDimensionUuid","name"]},"description":"The custom dimensions on this page, ordered by identifier. An empty array when the tenant has defined none."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more dimensions remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"resolveReportingTagsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension this value belongs to. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"modelId":{"type":"number","description":"The numeric id of the dimension record, stored internally on a journal entry's allocation line. Output only. References are made by modelUuid."},"modelUuid":{"type":"string","description":"The unique identifier of the dimension record this tag references. Present on every row."},"name":{"type":"string","description":"The display name of the tag value."},"isActive":{"type":"boolean","description":"Whether the tag value is currently active and can be assigned to new transactions. A deactivated value still resolves, so existing references keep working."},"customDimensionUuid":{"type":"string","description":"The unique identifier for the custom dimension this value belongs to. Present only when dimensionCode is 'custom'. Absent, not null, on the nine system dimensions."},"dimensionName":{"type":"string","description":"The display name of the parent custom dimension. Present only when dimensionCode is 'custom'. Absent, not null, on the nine system dimensions."}},"additionalProperties":false,"required":["dimensionCode","modelId","modelUuid","name","isActive"]},"description":"The resolved rows, in no guaranteed order and possibly shorter than the input, since references that did not resolve are absent. Match on the dimensionCode and modelUuid pair, never on position."},"unresolvedCount":{"type":"number","description":"How many of the requested references did not resolve. Zero when every reference resolved. Duplicates in the request are collapsed before this is counted."}},"additionalProperties":false,"required":["items","unresolvedCount"]},"resolveReportingTagsInput":{"type":"object","properties":{"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension the reference points into. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'. An unknown code fails the whole call with UNSUPPORTED_DIMENSION_CODE."},"modelUuid":{"type":"string","description":"The unique identifier of the dimension record the reference points at. It is unique within its dimension but not across dimensions, so dimensionCode is required with it. A value that resolves to nothing is dropped from the response, unlike an unknown dimensionCode. Obtain it from the document that carries the tag, or for custom values from GET base/custom-dimensions/:customDimensionUuid/values."}},"additionalProperties":false,"required":["dimensionCode","modelUuid"]},"description":"The references to decode, as dimensionCode and modelUuid pairs. At most 100 per call. More than 100 fails with TOO_MANY_REFERENCES. An empty array returns an empty items array rather than an error. Duplicate references are collapsed, so each distinct reference appears at most once in the response."}},"additionalProperties":false,"required":["reportingTags"]},"createSlackWorkspaceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the new connection."}},"additionalProperties":false,"required":["id"]},"createSlackWorkspaceInput":{"type":"object","properties":{"teamId":{"type":"string","description":"The Slack team id of the workspace to connect, for example 'T0C4A9X2BRR'.","examples":["T0C4A9X2BRR"]},"teamName":{"type":"string","description":"The display name of the Slack workspace.","examples":["Lensingbots Customer Test"]}},"additionalProperties":false,"required":["teamId"]},"deleteSlackWorkspaceOutput":{"type":"object","properties":{},"additionalProperties":false},"entitiesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the legal entity. Other resources reference it as entityId."},"entityName":{"type":"string","description":"The name of the legal entity, for example 'Acme Inc.'. Unique within the tenant."},"entityNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The entity's business number, separate from its name. Absent until one is assigned."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The entity's functional currency, its default for reporting and posting. Format ISO 4217, for example 'USD'. Absent when none has been set."},"timeZone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The time zone the entity operates in. Format IANA time-zone name, for example 'Europe/Berlin'. New entities default to 'Etc/UTC'. Absent when none has been set."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle status of the entity. Possible values: 'active', 'inactive', 'created'. 'created' is the default for a new entity."},"entityType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whether the entity is a legal entity or a non-legal reporting entity. Possible values: 'LegalEntity', 'NonLegalReportingEntity'. Defaults to 'LegalEntity'."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The country the entity is registered in. Format ISO 3166-1 alpha-2, for example 'US'. Absent when none has been set."},"entityCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A short code for the entity, separate from its entityNumber. Absent until one is assigned."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The parent entity in the entity hierarchy, which is what a consolidation rolls this entity up to. Absent on a top-level entity."},"localeCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The locale for documents sent from this entity, setting the language and regional format. Format BCP 47, for example 'en-US'. Absent when none has been set."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the entity became effective. Format YYYY-MM-DD. Absent when none has been set."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the entity stops being effective. Format YYYY-MM-DD. Absent when the entity has no scheduled end."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the entity last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"approvalPoliciesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the approval policy."},"policyHeaderNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The policy number, assigned when the policy is created and stable across edits."},"businessObject":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the business object the policy governs, for example 'VendorBill', 'ExpenseReport' or 'PurchaseOrder'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle status of the policy. Possible values: 'active', 'inActive'. Only active policies are matched against new documents. Documents already in flight keep approving against an inActive policy."},"isAllEntities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the policy applies to every legal entity rather than the one named by entityName."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the policy applies to. Absent when isAllEntities is true."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no lower bound."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no upper bound."},"submitterCannotApprove":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the document submitter is stopped from approving their own document. When true, their approval does not count toward fulfillment and they are not notified as an approver."},"useSubstitute":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve."},"approverCommentEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether approvers are prompted for an optional comment at approve time. The comment is stored on the approval trail."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the approval policy last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createApprovalPolicyOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created approval policy. Every other approval-policy endpoint is keyed by it.","examples":["9c1f4b62-7d38-4a05-b1e7-2f6a8c093d54"]}},"additionalProperties":false,"required":["id"]},"createApprovalPolicyInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the policy applies to. Required unless isAllEntities is true. Leave it out when using isAllEntities. See id on GET base/entities."},"isAllEntities":{"type":"boolean","description":"Whether the policy applies to every legal entity instead of a single one. When true, leave entityId out.","examples":[true]},"businessObject":{"type":"string","description":"The code of the business object the policy governs. It must be a registered approval business object, for example 'VendorBill', 'ExpenseReport', 'PurchaseOrder', 'PurchaseRequest' or 'JournalEntry'. An unregistered code fails with UNKNOWN_BUSINESS_OBJECT, which lists the registered codes. It cannot be changed after creation.","examples":["VendorBill"]},"status":{"enum":["active","inActive"],"description":"The lifecycle status of the policy. Defaults to 'active', which makes it eligible for matching immediately. Create it 'inActive' to stage a policy that would otherwise collide with a live one.","examples":["active"]},"startDate":{"type":"string","description":"The first date the policy is eligible for matching. Use format YYYY-MM-DD. Omit for no lower bound."},"endDate":{"type":"string","description":"The last date the policy is eligible for matching. Use format YYYY-MM-DD. Omit for no upper bound."},"submitterCannotApprove":{"type":"boolean","description":"Whether the document submitter is stopped from approving their own document. When true, their approval does not count toward fulfillment and they are not notified as an approver. Defaults to false."},"useSubstitute":{"type":"boolean","description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve. Defaults to false."},"approverCommentEnabled":{"type":"boolean","description":"Whether approvers are prompted for an optional comment at approve time. The comment is stored on the approval trail. Defaults to false.","examples":[true]},"notification":{"type":"object","properties":{"emailNotification":{"type":"boolean","description":"Whether to email approvers."},"nativeNotification":{"type":"boolean","description":"Whether to raise an in-product notification for approvers."},"slackNotification":{"type":"boolean","description":"Whether to notify approvers on Slack."}},"additionalProperties":false,"description":"The notification channels used when this policy's approvers and submitters are told about a document. Omit to leave the tenant's defaults in place.","examples":[{"emailNotification":true}]},"lines":{"type":"array","items":{"type":"object","properties":{"criteria":{"type":"string","description":"The document field the rule tests. Use the criteria names the document type publishes, for example 'Vendor', 'Total Amount', 'Department', 'Line Amounts' or 'Upon Creation'. Pass the literal __COMPOSITE__ to combine several conditions in one line."},"operator":{"type":"string","description":"The comparison to apply to the criteria, for example 'Equal', 'Not Equal', 'Greater Than', 'Less Than', 'In', 'Intersect' or the Any and All variants for array fields. Use '-' for a criteria that takes no value."},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string, for example [\"10000\"], not [10000]. Omit only when valueType is 'noValue'. A 'number' valueType takes exactly one numeric element. A 'composite' valueType takes exactly one element holding the JSON expression, for example {\"operator\":\"AND\",\"children\":[{\"criteriaName\":\"Vendor\",\"operator\":\"Equal\",\"value\":[\"Acme\"],\"valueType\":\"multivalue\"},{\"criteriaName\":\"Total Amount\",\"operator\":\"Less Than\",\"value\":[\"10000\"],\"valueType\":\"number\"}]}."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"],"description":"How to interpret value. 'number' is a single numeric comparison, 'multivalue' one or more discrete values, 'value' a single discrete value, 'noValue' a criteria that takes none such as 'Upon Creation', 'arrayField' the Any, All and Intersect operators over a line-level array, and 'composite' a __COMPOSITE__ expression."},"step":{"type":"number","description":"The approval order, starting at 1. Lines that share a step are approved together, and a higher step is reached only once the lower steps are satisfied."},"requireAction":{"enum":["All","Any"],"description":"Whether all of the line's approvers must approve, or any one of them is enough. Defaults to 'All'."},"approvers":{"type":"array","items":{"type":"object","properties":{"approverId":{"type":"number","description":"The approver. For approverType 'employee' or 'supremeApprover' it is the employee, and for 'manager' it is the manager-hierarchy record. It is an integer, not a UUID. There is no endpoint for it."},"approverType":{"enum":["employee","manager","supremeApprover"],"description":"The kind of approver. 'employee' names a specific person, 'manager' resolves the submitter's manager through a hierarchy at approval time, and 'supremeApprover' is a person who may approve at any step."}},"additionalProperties":false,"required":["approverId","approverType"]},"description":"The approvers for this line. It must not be empty, because a line with no approver can never be satisfied."}},"additionalProperties":false,"required":["criteria","operator","valueType","step","approvers"]},"description":"The policy's rule lines. It must not be empty. Rule lines are evaluated independently: a document picks up the approvers of every line it matches. To require several conditions together, use one __COMPOSITE__ line rather than several plain lines.","examples":[[{"criteria":"Total Amount","operator":"Greater Than","value":["10000"],"valueType":"number","step":1,"requireAction":"All","approvers":[{"approverId":42,"approverType":"employee"}]}]]},"exclusionLines":{"type":"array","items":{"type":"object","properties":{"criteria":{"type":"string"},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string. Omit only when valueType is 'noValue'."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"]}},"additionalProperties":false,"required":["criteria","operator","valueType"]},"description":"The exclusion lines. A document matching any of them is exempted from the policy entirely, whatever the rule lines say. Omit for no exclusions."}},"additionalProperties":false,"required":["businessObject","lines"]},"searchApprovalPoliciesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the approval policy."},"policyHeaderNumber":{"type":"string","description":"The policy number, assigned when the policy is created and stable across edits."},"entityId":{"type":"string","description":"The legal entity the policy applies to. Absent when isAllEntities is true. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the policy applies to. Absent when isAllEntities is true."},"isAllEntities":{"type":"boolean","description":"Whether the policy applies to every legal entity rather than the one named by entityId."},"businessObject":{"type":"string","description":"The code of the business object the policy governs, for example 'VendorBill', 'ExpenseReport' or 'PurchaseOrder'."},"status":{"type":"string","description":"The lifecycle status of the policy. Possible values: 'active', 'inActive'. Only active policies are matched against new documents."},"startDate":{"type":"string","description":"The first date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no lower bound."},"endDate":{"type":"string","description":"The last date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no upper bound."},"submitterCannotApprove":{"type":"boolean","description":"Whether the document submitter is stopped from approving their own document."},"useSubstitute":{"type":"boolean","description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve."},"approverCommentEnabled":{"type":"boolean","description":"Whether approvers are prompted for an optional comment at approve time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the approval policy last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"notification":{"type":"object","properties":{"emailNotification":{"type":"boolean"},"nativeNotification":{"type":"boolean"},"slackNotification":{"type":"boolean"}},"additionalProperties":false,"description":"The notification channels used when approvers and submitters are told about this policy's documents. Absent when they have never been configured for this policy."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"policyLineNumber":{"type":"string"},"criteria":{"type":"string","description":"The document field the rule tests, for example 'Vendor' or 'Total Amount'. The literal __COMPOSITE__ marks a line whose value is a JSON AND or OR expression over several criteria."},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"},"description":"The values the criteria is compared against, each as a string. For a __COMPOSITE__ line this is a single-element array holding the JSON expression."},"valueType":{"type":"string"},"step":{"type":"number","description":"The approval order, starting at 1. Lines that share a step are evaluated and approved together."},"requireAction":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"approverId":{"type":"number","description":"The approver. For approverType 'employee' or 'supremeApprover' it is the employee, and for 'manager' it is the manager-hierarchy record. It is an integer, not a UUID. There is no endpoint for it."},"approverType":{"type":"string"},"approverName":{"type":"string","description":"The resolved display name of the approver. Absent when the referenced employee or manager no longer exists."}},"additionalProperties":false,"required":["id","approverId","approverType"]},"description":"The approvers assigned to this line. A line always has at least one."}},"additionalProperties":false,"required":["id","criteria","operator","value","step","approvers"]},"description":"The policy's rule lines, ordered by step. A document picks up the approvers of every line it matches."},"exclusionLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"criteria":{"type":"string"},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"}},"valueType":{"type":"string"}},"additionalProperties":false,"required":["id","criteria","operator","value"]},"description":"The exclusion lines. A document matching any of them is exempted from the policy entirely."}},"additionalProperties":false,"required":["id","businessObject","status","lastModifiedDate","lines","exclusionLines"]},"description":"The approval policies that match, oldest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchApprovalPoliciesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"businessObject":{"type":"string","description":"Limits results to policies governing this business object, for example 'VendorBill'. A code that matches no registered business object returns an empty page."},"status":{"type":"string","description":"Limits results to policies in this lifecycle status. Accepted values: 'active', 'inActive'. Any other value returns an empty page."},"entityId":{"type":"string","description":"Limits results to policies scoped to this legal entity, given as the entity id. Accepted only in the request body. An id that matches no entity returns an empty page, not an error. This does not include the all-entities policies. Combine with isAllEntities to widen. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to policies whose legal entity name contains this text. The match is case-sensitive. Accepted only in the request body. Use entityId when you already have the id."},"isAllEntities":{"type":"boolean","description":"Limits results to policies that cover every legal entity when true, or only single-entity policies when false."},"policyHeaderNumber":{"type":"string","description":"Limits results to the policy with this policy number. The match is exact."},"startDate":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false,"description":"Limits results by the policy's startDate. Both bounds are inclusive. Use format YYYY-MM-DD, and omit either side for an open-ended range."},"endDate":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false,"description":"Limits results by the policy's endDate. Both bounds are inclusive. Use format YYYY-MM-DD, and omit either side for an open-ended range."}},"additionalProperties":false,"description":"The filters to apply. A policy must match every filter you send. Omit to return all approval policies.","examples":[{"businessObject":"VendorBill","status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of policies per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Cursor pagination. Omit the whole object for the first page at the default size.","examples":[{"size":25}]}},"additionalProperties":false},"updateApprovalPolicyOutput":{"type":"object","properties":{},"additionalProperties":false},"updateApprovalPolicyInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the policy applies to. Omit to leave unchanged. Ignored when isAllEntities is true. See id on GET base/entities."},"isAllEntities":{"type":"boolean","description":"Whether the policy applies to every legal entity. Set true to widen it to all, false to narrow it back to the entity in entityId. Omit to leave unchanged."},"status":{"enum":["active","inActive"],"description":"The lifecycle status of the policy. Omit to leave unchanged. Setting 'inActive' stops the policy matching new documents, while documents already in the workflow keep approving against it, which makes it the safe alternative to deleting.","examples":["inActive"]},"startDate":{"type":"string","description":"The first date the policy is eligible for matching. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","description":"The last date the policy is eligible for matching. Use format YYYY-MM-DD. Omit to leave unchanged."},"submitterCannotApprove":{"type":"boolean","description":"Whether the document submitter is stopped from approving their own document. Omit to leave unchanged."},"useSubstitute":{"type":"boolean","description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve. Omit to leave unchanged."},"approverCommentEnabled":{"type":"boolean","description":"Whether approvers are prompted for an optional comment at approve time. Omit to leave unchanged."},"notification":{"type":"object","properties":{"emailNotification":{"type":"boolean"},"nativeNotification":{"type":"boolean"},"slackNotification":{"type":"boolean"}},"additionalProperties":false,"description":"The notification channels for this policy. This object replaces the stored settings, so a channel left out is turned off. Omit the object to leave the settings unchanged."},"createLines":{"type":"array","items":{"type":"object","properties":{"criteria":{"type":"string","description":"The document field the rule tests, for example 'Vendor', 'Total Amount' or 'Upon Creation'. Pass the literal __COMPOSITE__ to combine several conditions in one line."},"operator":{"type":"string","description":"The comparison to apply to the criteria, for example 'Equal', 'Not Equal', 'Greater Than', 'Less Than', 'In', 'Intersect' or the Any and All variants for array fields. Use '-' for a criteria that takes no value."},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string. Omit only when valueType is 'noValue'."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"],"description":"How to interpret value. 'number' is a single numeric comparison, 'multivalue' one or more discrete values, 'value' a single discrete value, 'noValue' a criteria that takes none such as 'Upon Creation', 'arrayField' the Any, All and Intersect operators over a line-level array, and 'composite' a __COMPOSITE__ expression."},"step":{"type":"number","description":"The approval order, starting at 1. Lines that share a step are approved together, and a higher step is reached only once the lower steps are satisfied."},"requireAction":{"enum":["All","Any"],"description":"Whether all of the line's approvers must approve, or any one of them is enough. Defaults to 'All'."},"approvers":{"type":"array","items":{"type":"object","properties":{"approverId":{"type":"number","description":"The approver. For approverType 'employee' or 'supremeApprover' it is the employee, and for 'manager' it is the manager-hierarchy record. It is an integer, not a UUID. There is no endpoint for it."},"approverType":{"enum":["employee","manager","supremeApprover"]}},"additionalProperties":false,"required":["approverId","approverType"]},"description":"The approvers for this line. It must not be empty."}},"additionalProperties":false,"required":["criteria","operator","valueType","step","approvers"]},"description":"The rule lines to add. Each is a whole new line with no id, carrying its approvers as a plain array."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing rule line, from the line's id on GET base/approval-policies/:id. An id that does not belong to this policy fails with UNKNOWN_LINE."},"criteria":{"type":"string","description":"The document field the rule tests. Omit to leave it unchanged."},"operator":{"type":"string","description":"The comparison to apply to the criteria. Omit to leave it unchanged."},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string. This replaces the whole list rather than merging into it. Omit to leave it unchanged."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"],"description":"How to interpret value. Omit to leave it unchanged."},"step":{"type":"number","description":"The approval order, starting at 1. Omit to leave it unchanged."},"requireAction":{"enum":["All","Any"],"description":"Whether all of the line's approvers must approve, or any one of them is enough. Omit to leave it unchanged."},"createApprovers":{"type":"array","items":{"type":"object","properties":{"approverId":{"type":"number"},"approverType":{"enum":["employee","manager","supremeApprover"]}},"additionalProperties":false,"required":["approverId","approverType"]},"description":"The approvers to add to this line."},"updateApprovers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing approver assignment, from the approver's id on GET base/approval-policies/:id."},"approverId":{"type":"number","description":"The approver. Omit to leave it unchanged."},"approverType":{"enum":["employee","manager","supremeApprover"],"description":"The kind of approver. Omit to leave it unchanged."}},"additionalProperties":false,"required":["id"]},"description":"The approvers to change, matched by id. An id that does not belong to this line fails with UNKNOWN_APPROVER."},"deleteApprovers":{"type":"array","items":{"type":"string"},"description":"The ids of approver assignments to remove from this line. Removing the last approver of a surviving line fails with LINE_WITHOUT_APPROVERS."}},"additionalProperties":false,"required":["id"]},"description":"The rule lines to change, matched by id. Every field except id is optional, and omitting one leaves it unchanged. Each line edits its own approvers through the nested createApprovers, updateApprovers and deleteApprovers arrays.","examples":[[{"id":"4e2b7a90-5c31-4d68-9f02-8a1c6b45e7d3","value":["25000"],"createApprovers":[{"approverId":77,"approverType":"employee"}],"deleteApprovers":["b8c5d2e1-3f47-4a90-8e16-5d2b9c703f8a"]}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of rule lines to remove. Deleting a line also removes its approvers, so do not list them separately."},"createExclusionLines":{"type":"array","items":{"type":"object","properties":{"criteria":{"type":"string"},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string. Omit only when valueType is 'noValue'."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"]}},"additionalProperties":false,"required":["criteria","operator","valueType"]},"description":"The exclusion lines to add."},"updateExclusionLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing exclusion line. An id that does not belong to this policy fails with UNKNOWN_EXCLUSION_LINE."},"criteria":{"type":"string"},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"}},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"]}},"additionalProperties":false,"required":["id"]},"description":"The exclusion lines to change, matched by id. Omitting a field leaves it unchanged."},"deleteExclusionLines":{"type":"array","items":{"type":"string"},"description":"The ids of exclusion lines to remove.","examples":[["1a3c5e70-9b24-4f18-a06d-7c8e2b41d95f"]]}},"additionalProperties":false},"deleteApprovalPolicyOutput":{"type":"object","properties":{},"additionalProperties":false},"getApprovalPolicyOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the approval policy."},"policyHeaderNumber":{"type":"string","description":"The policy number, assigned when the policy is created and stable across edits."},"entityId":{"type":"string","description":"The legal entity the policy applies to. Absent when isAllEntities is true. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the policy applies to. Absent when isAllEntities is true."},"isAllEntities":{"type":"boolean","description":"Whether the policy applies to every legal entity rather than the one named by entityId."},"businessObject":{"type":"string","description":"The code of the business object the policy governs, for example 'VendorBill', 'ExpenseReport' or 'PurchaseOrder'."},"status":{"type":"string","description":"The lifecycle status of the policy. Possible values: 'active', 'inActive'. Only active policies are matched against new documents."},"startDate":{"type":"string","description":"The first date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no lower bound."},"endDate":{"type":"string","description":"The last date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no upper bound."},"submitterCannotApprove":{"type":"boolean","description":"Whether the document submitter is stopped from approving their own document."},"useSubstitute":{"type":"boolean","description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve."},"approverCommentEnabled":{"type":"boolean","description":"Whether approvers are prompted for an optional comment at approve time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the approval policy last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"notification":{"type":"object","properties":{"emailNotification":{"type":"boolean","description":"Whether approvers are emailed."},"nativeNotification":{"type":"boolean","description":"Whether approvers get an in-product notification."},"slackNotification":{"type":"boolean","description":"Whether approvers are notified on Slack."}},"additionalProperties":false,"description":"The notification channels used when approvers and submitters are told about this policy's documents. Absent when they have never been configured for this policy."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule line. Pass it in updateLines or deleteLines on PATCH base/approval-policies/:id."},"policyLineNumber":{"type":"string","description":"The rule line number, assigned when the line is created."},"criteria":{"type":"string","description":"The document field the rule tests, for example 'Vendor' or 'Total Amount'. The literal __COMPOSITE__ marks a line whose value is a JSON AND or OR expression over several criteria."},"operator":{"type":"string","description":"The comparison applied to the criteria, for example 'Equal' or 'Less Than'."},"value":{"type":"array","items":{"type":"string"},"description":"The values the criteria is compared against, each as a string. For a __COMPOSITE__ line this is a single-element array holding the JSON expression."},"valueType":{"type":"string","description":"How the value is interpreted. Possible values: 'number', 'multivalue', 'value', 'noValue', 'arrayField', 'composite'."},"step":{"type":"number","description":"The approval order, starting at 1. Lines that share a step are evaluated and approved together."},"requireAction":{"type":"string","description":"Whether all of the line's approvers must approve, or any one of them is enough. Possible values: 'All', 'Any'."},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the approver assignment. Pass it in updateApprovers or deleteApprovers on PATCH base/approval-policies/:id."},"approverId":{"type":"number","description":"The approver. For approverType 'employee' or 'supremeApprover' it is the employee, and for 'manager' it is the manager-hierarchy record. It is an integer, not a UUID. There is no endpoint for it."},"approverType":{"type":"string","description":"The kind of approver. Possible values: 'employee', 'manager', 'supremeApprover', 'position'. 'employee' names a specific person, 'manager' resolves the submitter's manager through a hierarchy at approval time, and 'supremeApprover' is a person who may approve at any step."},"approverName":{"type":"string","description":"The resolved display name of the approver. Absent when the referenced employee or manager no longer exists."}},"additionalProperties":false,"required":["id","approverId","approverType"]},"description":"The approvers assigned to this line. A line always has at least one."}},"additionalProperties":false,"required":["id","criteria","operator","value","step","approvers"]},"description":"The policy's rule lines, ordered by step. A document picks up the approvers of every line it matches."},"exclusionLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the exclusion line. Pass it in updateExclusionLines or deleteExclusionLines on PATCH base/approval-policies/:id."},"criteria":{"type":"string","description":"The document field the exclusion tests."},"operator":{"type":"string","description":"The comparison applied to the criteria."},"value":{"type":"array","items":{"type":"string"},"description":"The values the criteria is compared against, each as a string."},"valueType":{"type":"string","description":"How the value is interpreted. Possible values: 'number', 'multivalue', 'value', 'noValue', 'arrayField', 'composite'."}},"additionalProperties":false,"required":["id","criteria","operator","value"]},"description":"The exclusion lines. A document matching any of them is exempted from the policy entirely."}},"additionalProperties":false,"required":["id","businessObject","status","lastModifiedDate","lines","exclusionLines"]},"searchPermissionItemsOutput":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the permission."},"description":{"type":"string","description":"The description of the permission."},"uuid":{"type":"string","description":"The unique identifier for the permission."},"package":{"type":"string","description":"The package that owns the permission."}},"additionalProperties":false,"required":["name","uuid","package"]},"description":"The matching permissions, best match first."},"permissionType":{"enum":["tasks","roles"],"description":"The kind of permission that was searched."}},"additionalProperties":false,"required":["permissions","permissionType"]},"searchPermissionItemsInput":{"type":"object","properties":{"queryString":{"type":"string","description":"The text to match against the name and description of each permission. Must have 3 or more characters."},"permissionType":{"enum":["tasks","roles"],"description":"The kind of permission to search: 'roles' or 'tasks'."},"limit":{"type":"number","description":"The maximum number of results. Must be greater than 0. Defaults to 5."}},"additionalProperties":false,"required":["queryString","permissionType"]},"updateProspectOutput":{"type":"object","properties":{},"additionalProperties":false},"updateProspectInput":{"type":"object","properties":{"prospectName":{"type":"string","description":"The name of the prospect organization. Must not be empty. Omit to leave unchanged."},"entityId":{"type":"string","description":"The legal entity that owns the prospect. See id on GET base/entities. Omit to leave unchanged."},"billingEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address invoices for this prospect would be sent to. Send null to clear, omit to leave unchanged.","examples":["invoices@northwind.example"]},"crmId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this prospect in an external CRM system. Send null to clear, omit to leave unchanged."},"customerType":{"enum":["default","partner"],"description":"The commercial relationship. Omit to leave unchanged."},"defaultCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency quotes for this prospect default to, ISO 4217. Send null to clear, omit to leave unchanged."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. Switching it on copies the bill-to address over the sold-to address. Omit to leave unchanged."},"billToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Must not be empty. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear, omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Must not be empty. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'; otherwise send an empty string to clear. Omit to leave unchanged."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty. Omit to leave unchanged."},"attention":{"type":"string","description":"The person or department that mail to this address is for. Send an empty string to clear, omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the bill-to address. Omit to leave it unchanged.","examples":[{"line1":"500 Terry Avenue North"}]},"soldToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Must not be empty. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear, omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Must not be empty. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'; otherwise send an empty string to clear. Omit to leave unchanged."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty. Omit to leave unchanged."},"attention":{"type":"string","description":"The person or department that mail to this address is for. Send an empty string to clear, omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the sold-to address. Must be omitted while sameAsBillToAddress is true."},"createContacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An existing contact to link. It must not belong to another prospect. When set, send no other contact details."},"displayName":{"type":"string","description":"The contact's display name. Required for a new contact."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at. Required for a new contact. When an existing contact has this address, that contact is linked instead of a new one, as in the app."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Defaults to false."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Defaults to false."}},"additionalProperties":false},"description":"Contacts to add to the prospect. Each is a new contact, or an existing one linked by id.","examples":[[{"displayName":"Ravi Menon","emailAddress":"ravi.menon@northwind.example","isDefaultBillToContact":true}]]},"updateContacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for a contact of the prospect."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Omit to leave unchanged."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to the role flags of contacts already on the prospect.","examples":[[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","isDefaultBillToContact":false}]]},"deleteContacts":{"type":"array","items":{"type":"string"},"description":"The ids of contacts to remove from the prospect. The contact records are kept."}},"additionalProperties":false},"getOpportunityStagesOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of this set of stages. It currently equals entityId; treat it as opaque."},"entityId":{"type":"string","description":"The legal entity the stages belong to. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time any of the stages last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"stages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the stage. An opportunity's stageId holds this value."},"stageName":{"type":"string","description":"The display name of the stage, for example 'Qualification'."},"stageType":{"enum":["open","closedWon","closedLost"],"description":"What reaching the stage means for an opportunity."},"probability":{"type":"string","format":"decimal","description":"The likelihood that an opportunity in this stage closes as won, as a percentage from 0 to 100. For example, 25 means 25%. A percentage, not an amount, so it has no currency."},"orderIndex":{"type":"number","description":"The position of the stage; stages are ordered by it. Unique within the entity. After any write the positions are 0, 1, 2 … with no gaps."},"isDeactivated":{"type":"boolean","description":"Whether the stage is retired. A deactivated stage stays on record but is not offered for new opportunities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the stage record last changed, in UTC. Every write to the entity's stages updates it for every stage. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","stageName","stageType","probability","orderIndex","isDeactivated"]},"description":"The stages, ordered by orderIndex."}},"additionalProperties":false,"required":["id","entityId","stages"]},"getQuoteOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"quoteNumber":{"type":"string","description":"The system-generated quote number, for example 'QT-1042'. Absent while none has been assigned.","examples":["QT-1042"]},"quoteType":{"type":"string","description":"The kind of quote. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'.","examples":["new"]},"status":{"type":"string","description":"Where the quote stands in its business process. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Absent on a quote that has not entered the process.","examples":["approved"]},"approvalStatus":{"type":"string","description":"Where the quote stands in its approval process. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Absent until the approval process has run.","examples":["approved"]},"isPrimary":{"type":"boolean","description":"Whether this is the primary quote of its opportunity.","examples":[true]},"quoteDate":{"type":"string","format":"date","description":"The date the quote was drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date.","examples":["2026-08-01"]},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription on the quote starts before it.","examples":["2026-09-01"]},"signDate":{"type":"string","format":"date","description":"The date the quote was signed by the customer and the legal entity. Format YYYY-MM-DD. Absent when not recorded.","examples":["2026-08-14"]},"paymentTerm":{"type":"string","description":"The code of the payment term applied to invoices created from this quote. See code on GET accounting/payment-terms.","examples":["NET30"]},"memo":{"type":"string","description":"A free-text memo recorded on the quote. Absent when none is set.","examples":["Two-year platform subscription, renegotiated after the pilot."]},"needsPSACalculation":{"type":"boolean","description":"Whether the quote takes its product data from a PSA project rather than from the product catalog.","examples":[false]},"currency":{"type":"string","description":"The currency of every amount on the quote. A quote takes the currency of its opportunity and has none of its own. Format ISO 4217, for example 'USD'.","examples":["USD"]},"totalPrice":{"type":"string","format":"decimal","description":"The sum of the quote's lines before tax, less any one-time discount, in the quote's currency.","examples":["48000.00"]},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount applied to the whole quote, in the quote's currency.","examples":["2000.00"]},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the quote's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'.","examples":["firstInvoice"]},"billableTimeEstimate":{"type":"string","format":"decimal","description":"The estimated total of the quote's billable-time lines, in the quote's currency."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the quote's currency."},"opportunityId":{"type":"string","description":"The opportunity this quote belongs to. See id on GET crm/opportunities/:id.","examples":["a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"]},"opportunityName":{"type":"string","description":"The name of the opportunity this quote belongs to. Absent when the opportunity has no name.","examples":["Northwind — platform expansion"]},"opportunityNumber":{"type":"string","description":"The opportunity number of the opportunity this quote belongs to, for example 'OP-1042'. Absent while none has been assigned.","examples":["OPP-2291"]},"billToAddressId":{"type":"string","description":"The bill-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it.","examples":["6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02"]},"soldToAddressId":{"type":"string","description":"The sold-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it.","examples":["6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02"]},"salesArrangementId":{"type":"string","description":"The sales arrangement this quote is assigned to. Set on change-order quotes. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the quote record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:44.000Z"]},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote subscription."},"termType":{"type":"string","description":"Whether the subscription runs to a fixed end date or renews indefinitely. Possible values: 'termed', 'evergreen'."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD. Never earlier than the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Set on a termed subscription and absent on an evergreen one."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The renewal term in months. Meaningful only when autoRenew is true."},"quoteProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product."},"quoteProductNumber":{"type":"string","description":"The system-assigned number of the quote product. Absent while none has been assigned."},"productId":{"type":"string","description":"The catalog product for this quote product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product in the catalog."},"productName":{"type":"string","description":"The name of that product in the catalog."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal, with quantities or prices stepping over time."},"rampInterval":{"type":"string","description":"How the ramp steps. Possible values: 'annually', 'specificDates'. Absent unless isRampDeal is true."},"rampInvoiceTiming":{"type":"string","description":"How a ramp deal is invoiced. Possible values: 'allAtOnce', 'perInterval'. Absent unless isRampDeal is true."},"orderIndex":{"type":"number","description":"The position of this product within the quote, for display ordering."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product line."},"quoteProductLineNumber":{"type":"string","description":"The system-assigned number of the quote product line. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The catalog product line this line was priced from. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of that catalog product line."},"parentQuoteProductLineId":{"type":"string","description":"The parent line this line hangs off, as an allowance or overage line does. Absent on a top-level line."},"lineType":{"type":"string","description":"What this line charges for. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"quantity":{"type":"string","format":"decimal","description":"The quantity on this line, as a count, not an amount. For a ramp deal the per-period quantity is on each ramp instead."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount, as a decimal fraction of listPrice. For example, 0.1 is 10%. It is not an amount."},"extendedListPrice":{"type":"string","format":"decimal","description":"The list price extended across the quantity, in the quote's currency."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Set on billable-time lines."},"totalPrice":{"type":"string","format":"decimal","description":"The total for this line, in the quote's currency."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annualized recurring revenue attributed to this line, in the quote's currency."},"invoiceFrequency":{"type":"string","description":"How often this line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the price is derived from quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. For a tiered or volume model the bands are in lineTiers. For a rateCard model they are in rateCardEntries."},"pricingTerm":{"type":"string","description":"The period the unit price is quoted for. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"overConsumptionBehavior":{"type":"string","description":"What happens when consumption exceeds a prepaid balance. Possible values: 'allowNegative', 'overage'. Set on prepaid lines."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Set on prepaid lines."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Defaults to the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Absent while open-ended."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tier band."},"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Absent on the open-ended top band."},"priceModel":{"type":"string","description":"How this band prices. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["id","fromQuantity","priceModel"]},"description":"The tiered or volume pricing bands for this line, ordered by fromQuantity. An empty array unless priceModel is a banded model."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"identifier":{"type":"string","description":"The identifier of the entry, unique within its line."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. Absent when it names none. There is no endpoint for it."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"type":"string","description":"The unit the price is quoted per. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units on this entry, as a count, not an amount."},"usageType":{"type":"string","description":"What the usage represents. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. For example, 0.1 when 1 gigabyte is 0.1 credits. It is a ratio, not an amount."},"billableUnitOfMeasure":{"type":"string","description":"The unit the entry is billed in, which may differ from unitOfMeasure. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."}},"additionalProperties":false,"required":["id","identifier","unitOfMeasure"]},"description":"The rate-card pricing for this line, one entry per billable component. An empty array unless priceModel is 'rateCard'."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"description":{"type":"string","description":"What the milestone covers, as recorded on the quote."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices as a percentage. For example, 25 is 25%. It is not an amount."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The invoice milestones for this line, when it is invoiced against milestones rather than on a frequency. An empty array otherwise."}},"additionalProperties":false,"required":["id","lineType","lineTiers","rateCardEntries","invoiceMilestones"]},"description":"The priced lines of this quote product. A product has at least one."}},"additionalProperties":false,"required":["id","quoteProductLines"]},"description":"The products in this subscription, each with its priced lines."}},"additionalProperties":false,"required":["id","termType","serviceStartDate","quoteProducts"]},"description":"The subscriptions on the quote, one per subscription, each with the products under it. An empty array when the quote has no recurring products. GET crm/quotes omits it and returns the quote header alone.","examples":[[{"id":"c2e1f4a7-8b90-4d33-9a15-6f7e8d2b0c41","termType":"termed","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","autoRenew":true,"renewalTerm":12,"quoteProducts":[{"id":"d4f2a1b8-3c67-4e05-8b92-1a7d0e6c5f38","quoteProductNumber":"QP-3","productId":"e5a3b2c9-4d78-4f16-9c03-2b8e1f7d6a49","productCode":"PLATFORM-ENT","productName":"Platform — Enterprise","isRampDeal":false,"orderIndex":1,"quoteProductLines":[{"id":"f6b4c3d0-5e89-4a27-8d14-3c9f2a8e7b50","quoteProductLineNumber":"QPL-7","productLineId":"a7c5d4e1-6f90-4b38-9e25-4d0a3b9f8c61","productLineName":"Enterprise seats","lineType":"recurring","quantity":"100.00","listPrice":"480.00","unitPrice":"400.00","discountPercentage":"0.166667","totalPrice":"40000.00","invoiceFrequency":"annually","priceModel":"tiered","pricingTerm":"annually","unitOfMeasure":"seat","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","orderIndex":1,"lineTiers":[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","fromQuantity":"1.00","toQuantity":"50.00","priceModel":"tiered","unitPrice":"440.00","listPrice":"480.00"},{"id":"c9e7f6a3-8b12-4d50-9a47-6f2c5d1b0e83","fromQuantity":"51.00","priceModel":"tiered","unitPrice":"400.00","listPrice":"480.00"}],"rateCardEntries":[],"invoiceMilestones":[]}]}]}]]},"nonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product."},"quoteProductNumber":{"type":"string","description":"The system-assigned number of the quote product. Absent while none has been assigned."},"productId":{"type":"string","description":"The catalog product for this quote product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product in the catalog."},"productName":{"type":"string","description":"The name of that product in the catalog."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal, with quantities or prices stepping over time."},"rampInterval":{"type":"string","description":"How the ramp steps. Possible values: 'annually', 'specificDates'. Absent unless isRampDeal is true."},"rampInvoiceTiming":{"type":"string","description":"How a ramp deal is invoiced. Possible values: 'allAtOnce', 'perInterval'. Absent unless isRampDeal is true."},"orderIndex":{"type":"number","description":"The position of this product within the quote, for display ordering."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product line."},"quoteProductLineNumber":{"type":"string","description":"The system-assigned number of the quote product line. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The catalog product line this line was priced from. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of that catalog product line."},"parentQuoteProductLineId":{"type":"string","description":"The parent line this line hangs off, as an allowance or overage line does. Absent on a top-level line."},"lineType":{"type":"string","description":"What this line charges for. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"quantity":{"type":"string","format":"decimal","description":"The quantity on this line, as a count, not an amount. For a ramp deal the per-period quantity is on each ramp instead."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount, as a decimal fraction of listPrice. For example, 0.1 is 10%. It is not an amount."},"extendedListPrice":{"type":"string","format":"decimal","description":"The list price extended across the quantity, in the quote's currency."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Set on billable-time lines."},"totalPrice":{"type":"string","format":"decimal","description":"The total for this line, in the quote's currency."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annualized recurring revenue attributed to this line, in the quote's currency."},"invoiceFrequency":{"type":"string","description":"How often this line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the price is derived from quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. For a tiered or volume model the bands are in lineTiers. For a rateCard model they are in rateCardEntries."},"pricingTerm":{"type":"string","description":"The period the unit price is quoted for. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"overConsumptionBehavior":{"type":"string","description":"What happens when consumption exceeds a prepaid balance. Possible values: 'allowNegative', 'overage'. Set on prepaid lines."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Set on prepaid lines."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Defaults to the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Absent while open-ended."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tier band."},"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Absent on the open-ended top band."},"priceModel":{"type":"string","description":"How this band prices. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["id","fromQuantity","priceModel"]},"description":"The tiered or volume pricing bands for this line, ordered by fromQuantity. An empty array unless priceModel is a banded model."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"identifier":{"type":"string","description":"The identifier of the entry, unique within its line."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. Absent when it names none. There is no endpoint for it."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"type":"string","description":"The unit the price is quoted per. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units on this entry, as a count, not an amount."},"usageType":{"type":"string","description":"What the usage represents. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. For example, 0.1 when 1 gigabyte is 0.1 credits. It is a ratio, not an amount."},"billableUnitOfMeasure":{"type":"string","description":"The unit the entry is billed in, which may differ from unitOfMeasure. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."}},"additionalProperties":false,"required":["id","identifier","unitOfMeasure"]},"description":"The rate-card pricing for this line, one entry per billable component. An empty array unless priceModel is 'rateCard'."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"description":{"type":"string","description":"What the milestone covers, as recorded on the quote."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices as a percentage. For example, 25 is 25%. It is not an amount."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The invoice milestones for this line, when it is invoiced against milestones rather than on a frequency. An empty array otherwise."}},"additionalProperties":false,"required":["id","lineType","lineTiers","rateCardEntries","invoiceMilestones"]},"description":"The priced lines of this quote product. A product has at least one."}},"additionalProperties":false,"required":["id","quoteProductLines"]},"description":"The products on the quote that belong to no subscription, such as one-time charges, billable time and pass-through expenses. An empty array when every product is under a subscription. GET crm/quotes omits it and returns the quote header alone.","examples":[[{"id":"d0f8a7b4-9c23-4e61-8b58-7a3d6e2c1f94","quoteProductNumber":"QP-4","productId":"e1a9b8c5-0d34-4f72-9c69-8b4e7f3d2a05","productCode":"ONBOARD","productName":"Onboarding","orderIndex":2,"quoteProductLines":[{"id":"f2b0c9d6-1e45-4a83-8d70-9c5f8a4e3b16","productLineId":"a3c1d0e7-2f56-4b94-9e81-0d6a9b5f4c27","productLineName":"Implementation","lineType":"oneTime","quantity":"1.00","listPrice":"10000.00","unitPrice":"10000.00","totalPrice":"10000.00","invoiceFrequency":"milestone","priceModel":"flat","unitOfMeasure":"each","lineTiers":[],"rateCardEntries":[],"invoiceMilestones":[{"id":"b4d2e1f8-3a67-4c05-9f92-1e7b0c6d5a38","description":"Kick-off","totalPrice":"5000.00","percentage":"50.0000","projectedDate":"2026-09-15"}]}]}]]}},"additionalProperties":false,"required":["id","quoteType","isPrimary","quoteDate","serviceStartDate","paymentTerm","opportunityId","lastModifiedDate","subscriptions","nonRecurringProducts"]},"listQuotesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote."},"quoteNumber":{"type":"string","description":"The system-generated quote number, for example 'QT-1042'. Absent while none has been assigned."},"quoteType":{"type":"string","description":"The kind of quote. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'."},"status":{"type":"string","description":"Where the quote stands in its business process. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Absent on a quote that has not entered the process."},"approvalStatus":{"type":"string","description":"Where the quote stands in its approval process. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Absent until the approval process has run."},"isPrimary":{"type":"boolean","description":"Whether this is the primary quote of its opportunity."},"quoteDate":{"type":"string","format":"date","description":"The date the quote was drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date."},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription on the quote starts before it."},"signDate":{"type":"string","format":"date","description":"The date the quote was signed by the customer and the legal entity. Format YYYY-MM-DD. Absent when not recorded."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to invoices created from this quote. See code on GET accounting/payment-terms."},"memo":{"type":"string","description":"A free-text memo recorded on the quote. Absent when none is set."},"needsPSACalculation":{"type":"boolean","description":"Whether the quote takes its product data from a PSA project rather than from the product catalog."},"currency":{"type":"string","description":"The currency of every amount on the quote. A quote takes the currency of its opportunity and has none of its own. Format ISO 4217, for example 'USD'."},"totalPrice":{"type":"string","format":"decimal","description":"The sum of the quote's lines before tax, less any one-time discount, in the quote's currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount applied to the whole quote, in the quote's currency."},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the quote's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'."},"billableTimeEstimate":{"type":"string","format":"decimal","description":"The estimated total of the quote's billable-time lines, in the quote's currency."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the quote's currency."},"opportunityId":{"type":"string","description":"The opportunity this quote belongs to. See id on GET crm/opportunities/:id."},"opportunityName":{"type":"string","description":"The name of the opportunity this quote belongs to. Absent when the opportunity has no name."},"opportunityNumber":{"type":"string","description":"The opportunity number of the opportunity this quote belongs to, for example 'OP-1042'. Absent while none has been assigned."},"billToAddressId":{"type":"string","description":"The bill-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it."},"salesArrangementId":{"type":"string","description":"The sales arrangement this quote is assigned to. Set on change-order quotes. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the quote record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","quoteType","isPrimary","quoteDate","serviceStartDate","paymentTerm","opportunityId","lastModifiedDate"]},"description":"The quotes on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quoteNumber":"QT-1042","quoteType":"new","status":"approved","approvalStatus":"approved","isPrimary":true,"quoteDate":"2026-08-01","serviceStartDate":"2026-09-01","signDate":"2026-08-14","paymentTerm":"NET30","memo":"Two-year platform subscription, renegotiated after the pilot.","needsPSACalculation":false,"currency":"USD","totalPrice":"48000.00","oneTimeDiscountAmount":"2000.00","oneTimeDiscountAllocation":"firstInvoice","opportunityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","opportunityName":"Northwind — platform expansion","opportunityNumber":"OPP-2291","billToAddressId":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","soldToAddressId":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","lastModifiedDate":"2026-08-14T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"nextCursor":"MTA","hasMore":true}]}},"additionalProperties":false,"required":["items","pagination"]},"updateOpportunityOutput":{"type":"object","properties":{},"additionalProperties":false},"updateOpportunityInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity that owns the opportunity. It must be active, and the customer and stage must belong to it. Omit to leave unchanged. See id on GET base/entities."},"customerId":{"type":"string","description":"The customer or prospect the opportunity is for. Omit to leave unchanged. See id on GET accounting/customers/:id or GET crm/prospects/:id."},"endCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end customer behind a partner customer. Omit to leave unchanged, or to drop it when customerId changes. Send null to clear. See id on GET accounting/customers/:id."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"priceBookId":{"type":"string","description":"The price book quotes on this opportunity are priced from. Omit to leave unchanged. See id on GET accounting/price-books/:id."},"stageId":{"type":"string","description":"The stage the opportunity sits in: an active stage on GET crm/opportunity-stages/:id, where :id is the entity's id. Omit to leave unchanged.","examples":["5b0e7c3a-2f6d-4a8b-9c1e-7d4f3a2b1c09"]},"opportunityName":{"type":"string","description":"The display name of the opportunity. Must not be empty. Omit to leave unchanged."},"closeDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The expected close date of the deal. Format YYYY-MM-DD. Omit to leave unchanged, send null to clear.","examples":["2027-04-30"]},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The expected deal amount, as a decimal in currency. Omit to leave unchanged, send null to clear."},"crmId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this opportunity in an external system, for example a Salesforce record id. Omit to leave unchanged, send null to clear."}},"additionalProperties":false},"createOpportunityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the created opportunity.","examples":["7d1c2b3a-9e8f-4a6b-b5c4-3d2e1f0a9b87"]}},"additionalProperties":false,"required":["id"]},"createOpportunityInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity that owns the opportunity. It must be active. See id on GET base/entities.","examples":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"]},"customerId":{"type":"string","description":"The customer or prospect the opportunity is for. It must belong to entityId. See id on GET accounting/customers/:id or GET crm/prospects/:id.","examples":["0e3a9f41-6c2b-4d7e-8a15-2b9c7d4e6f10"]},"endCustomerId":{"type":"string","description":"The end customer behind a partner customer: required when customerId is a partner, not allowed otherwise. See id on GET accounting/customers/:id."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"priceBookId":{"type":"string","description":"The price book quotes on this opportunity are priced from. See id on GET accounting/price-books/:id.","examples":["5b0e7c3a-2f6d-4a8b-9c1e-7d4f3a2b1c09"]},"stageId":{"type":"string","description":"The stage the opportunity starts in: an active stage on GET crm/opportunity-stages/:id, where :id is entityId. Omit to start in the entity's first stage."},"opportunityName":{"type":"string","description":"The display name of the opportunity. Must not be empty.","examples":["Acme renewal 2027"]},"closeDate":{"type":"string","format":"date","description":"The expected close date of the deal. Format YYYY-MM-DD.","examples":["2027-03-31"]},"amount":{"type":"string","format":"decimal","description":"The expected deal amount, as a decimal in currency.","examples":["125000.00"]},"crmId":{"type":"string","description":"The identifier of this opportunity in an external system, for example a Salesforce record id. Free text."}},"additionalProperties":false,"required":["entityId","customerId","currency","priceBookId","opportunityName"]},"updateQuoteOutput":{"type":"object","properties":{},"additionalProperties":false},"updateQuoteInput":{"type":"object","properties":{"quoteDate":{"type":"string","format":"date","description":"The date the quote is drawn up. Format YYYY-MM-DD. Omit to leave unchanged."},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. Omit to leave unchanged."},"paymentTerm":{"type":"string","description":"The code of the payment term. See code on GET accounting/payment-terms. Omit to leave unchanged."},"billToAddressId":{"type":"string","description":"The address to bill; the quote's own copy is overwritten with it. Not accepted on a 'changeOrder' quote. Omit to leave unchanged."},"soldToAddressId":{"type":"string","description":"The address the products are sold to; the quote's own copy is overwritten with it. Not accepted on a 'changeOrder' quote. Omit to leave unchanged."},"isPrimary":{"type":"boolean","description":"Pass true to make this the opportunity's primary quote. A primary quote cannot be unset; make another quote primary instead. Omit to leave unchanged."},"memo":{"type":"string","description":"A free-text memo for the quote. Omit to leave unchanged.","examples":["Renegotiated after the pilot."]},"signDate":{"type":"string","format":"date","description":"The date the quote was signed. Format YYYY-MM-DD. Omit to leave unchanged."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount on the whole quote, in the quote's currency. Omit to leave unchanged."},"oneTimeDiscountAllocation":{"enum":["firstInvoice","alignToInvoiceFrequency","custom"],"description":"How oneTimeDiscountAmount is spread across the quote's invoices. Omit to leave unchanged."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the quote's currency. Omit to leave unchanged."},"createSubscriptions":{"type":"array","items":{"type":"object","properties":{"termType":{"enum":["termed","evergreen"],"description":"Whether the subscription runs to a fixed end date or renews indefinitely."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Required on a termed subscription."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The renewal term in months."},"quoteProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal."},"rampInterval":{"enum":["annually","specificDates"],"description":"How the ramp steps. Only with isRampDeal."},"rampInvoiceTiming":{"enum":["allAtOnce","perInterval"],"description":"How a ramp deal is invoiced. Only with isRampDeal."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"The products in this subscription."}},"additionalProperties":false,"required":["termType","serviceStartDate","quoteProducts"]},"description":"Subscriptions to add, each with its products, in the shape POST crm/quotes takes."},"updateSubscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the subscription on this quote."},"termType":{"enum":["termed","evergreen"],"description":"Whether the subscription runs to a fixed end date or renews indefinitely. Omit to leave unchanged."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically. Omit to leave unchanged."},"renewalTerm":{"type":"number","description":"The renewal term in months. Omit to leave unchanged."},"createQuoteProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal."},"rampInterval":{"enum":["annually","specificDates"],"description":"How the ramp steps. Only with isRampDeal."},"rampInvoiceTiming":{"enum":["allAtOnce","perInterval"],"description":"How a ramp deal is invoiced. Only with isRampDeal."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"Products to add to this subscription."},"updateQuoteProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the quote product in this subscription."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal. Omit to leave unchanged."},"rampInterval":{"enum":["annually","specificDates"],"description":"How the ramp steps. Omit to leave unchanged."},"rampInvoiceTiming":{"enum":["allAtOnce","perInterval"],"description":"How a ramp deal is invoiced. Omit to leave unchanged."},"createQuoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to the quote product's product. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"Lines to add to this quote product."},"updateQuoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the line on this quote product."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount. Omit to leave unchanged."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency. Omit to leave unchanged."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency. Omit to leave unchanged."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency. Omit to leave unchanged."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent. Omit to leave unchanged."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Omit to leave unchanged."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced. Omit to leave unchanged."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Omit to leave unchanged."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for. Omit to leave unchanged."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in. Omit to leave unchanged."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Omit to leave unchanged."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Omit to leave unchanged."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"orderIndex":{"type":"number","description":"The position of this line within its quote product. Omit to leave unchanged."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The line's pricing bands, replacing the current ones. Omit to leave unchanged."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of a rate-card entry already on this line, to change it in place; the fields sent overwrite its values and the others are kept. Omit to add a new entry."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The line's rate-card entries, replacing the current set: an entry with an id updates that entry, one without adds an entry, and a current entry left out is deleted. Omit to leave unchanged."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The line's invoice milestones, replacing the current ones. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to lines of this quote product, each matched by id."},"deleteQuoteProductLines":{"type":"array","items":{"type":"string"},"description":"Identifiers of lines of this quote product to remove."}},"additionalProperties":false,"required":["id"]},"description":"Changes to products of this subscription, each matched by id."},"deleteQuoteProducts":{"type":"array","items":{"type":"string"},"description":"Identifiers of products of this subscription to remove, with their lines."}},"additionalProperties":false,"required":["id"]},"description":"Changes to existing subscriptions, each matched by id.","examples":[[{"id":"c2e1f4a7-8b90-4d33-9a15-6f7e8d2b0c41","updateQuoteProducts":[{"id":"d4f2a1b8-3c67-4e05-8b92-1a7d0e6c5f38","updateQuoteProductLines":[{"id":"f6b4c3d0-5e89-4a27-8d14-3c9f2a8e7b50","quantity":"120"}]}]}]]},"deleteSubscriptions":{"type":"array","items":{"type":"string"},"description":"Identifiers of subscriptions to remove, with their products."},"createNonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"Products outside any subscription to add, in the shape POST crm/quotes takes."},"updateNonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the quote product outside any subscription."},"createQuoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to the quote product's product. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"Lines to add to this quote product."},"updateQuoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the line on this quote product."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount. Omit to leave unchanged."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency. Omit to leave unchanged."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency. Omit to leave unchanged."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency. Omit to leave unchanged."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent. Omit to leave unchanged."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Omit to leave unchanged."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced. Omit to leave unchanged."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Omit to leave unchanged."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for. Omit to leave unchanged."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in. Omit to leave unchanged."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Omit to leave unchanged."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Omit to leave unchanged."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"orderIndex":{"type":"number","description":"The position of this line within its quote product. Omit to leave unchanged."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The line's pricing bands, replacing the current ones. Omit to leave unchanged."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of a rate-card entry already on this line, to change it in place; the fields sent overwrite its values and the others are kept. Omit to add a new entry."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The line's rate-card entries, replacing the current set: an entry with an id updates that entry, one without adds an entry, and a current entry left out is deleted. Omit to leave unchanged."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The line's invoice milestones, replacing the current ones. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to lines of this quote product, each matched by id."},"deleteQuoteProductLines":{"type":"array","items":{"type":"string"},"description":"Identifiers of lines of this quote product to remove."}},"additionalProperties":false,"required":["id"]},"description":"Changes to products outside any subscription, each matched by id."},"deleteNonRecurringProducts":{"type":"array","items":{"type":"string"},"description":"Identifiers of products outside any subscription to remove, with their lines.","examples":[["d0f8a7b4-9c23-4e61-8b58-7a3d6e2c1f94"]]}},"additionalProperties":false},"createProspectOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created prospect.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createProspectInput":{"type":"object","properties":{"prospectName":{"type":"string","description":"The name of the prospect organization. Must not be empty.","examples":["Northwind Logistics"]},"entityId":{"type":"string","description":"The legal entity that owns the prospect. See id on GET base/entities.","examples":["a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"]},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to.","examples":["ap@northwind.example"]},"crmId":{"type":"string","description":"The identifier of this prospect in an external CRM system."},"customerType":{"enum":["default","partner"],"description":"The commercial relationship. Defaults to 'default'.","examples":["default"]},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'.","examples":["USD"]},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. When true, omit soldToAddress. Defaults to false.","examples":[true]},"billToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box. Must not be empty."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality. Must not be empty."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The prospect's bill-to address.","examples":[{"line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"US-WA","country":"US","zipCode":"98109"}]},"soldToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box. Must not be empty."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality. Must not be empty."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The prospect's sold-to address. Required unless sameAsBillToAddress is true, and must be omitted when it is."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An existing contact to link. It must not belong to another prospect. When set, send no other contact details."},"displayName":{"type":"string","description":"The contact's display name. Required for a new contact."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at. Required for a new contact."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Defaults to false."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Defaults to false."}},"additionalProperties":false},"description":"The prospect's contacts. Each is a new contact, or an existing one linked by id.","examples":[[{"displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","isDefaultBillToContact":true,"isDefaultSoldToContact":true}]]}},"additionalProperties":false,"required":["prospectName","entityId","billToAddress"]},"listOpportunitiesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the opportunity."},"opportunityNumber":{"type":"string","description":"The system-generated opportunity number, for example 'OP-1042'. Absent while none has been assigned."},"entityId":{"type":"string","description":"The legal entity that owns the opportunity."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'."},"customerId":{"type":"string","description":"The identifier of the customer or prospect this opportunity is for. customerPath says which kind of record it is. Absent when it points at neither. See id on GET accounting/customers/:id for a customer, or GET crm/prospects/:id for a prospect."},"customerPath":{"type":"string","description":"Which kind of record customerId identifies. The value ends in 'Customer.id' when it is a customer and in 'Prospect.id' when it is a prospect. Absent when neither resolves."},"endCustomerId":{"type":"string","description":"The identifier of the end customer behind a partner customer. Absent unless one is on record. See id on GET accounting/customers/:id."},"priceBookId":{"type":"string","description":"The identifier of the price book quotes on this opportunity are priced from. See id on GET accounting/price-books/:id."},"stageId":{"type":"string","description":"The identifier of the stage the opportunity currently sits in: one of the stages on GET crm/opportunity-stages/:id, where :id is this opportunity's entityId."},"opportunityName":{"type":"string","description":"The free-text display name of the opportunity. Absent when none is set."},"closeDate":{"type":"string","format":"date","description":"The expected close date of the deal. Format YYYY-MM-DD. Absent when none is set."},"amount":{"type":"string","format":"decimal","description":"The expected deal amount, as a decimal in the opportunity's currency. Absent when none is set."},"crmId":{"type":"string","description":"The identifier of this opportunity in the external system it was imported from, for example a Salesforce record id. It is free text and not unique. Absent when none is set."},"dataSource":{"type":"string","description":"The system the record came from, for example 'Salesforce'. Records created in Lensing have the value 'Everest'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the opportunity record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"quotes":{"type":"array","items":{"type":"object","properties":{"quoteId":{"type":"string","description":"The identifier of the linked quote. See id on GET crm/quotes/:id."},"isPrimary":{"type":"boolean","description":"Whether this is a primary quote for the opportunity. It is not guaranteed to be true for exactly one quote."}},"additionalProperties":false,"required":["quoteId","isPrimary"]},"description":"Every quote linked to this opportunity. An empty array when it has none."}},"additionalProperties":false,"required":["id","entityId","currency","priceBookId","stageId","quotes"]},"description":"The opportunities on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"updateOpportunityStagesOutput":{"type":"object","properties":{},"additionalProperties":false},"updateOpportunityStagesInput":{"type":"object","properties":{"createStages":{"type":"array","items":{"type":"object","properties":{"stageName":{"type":"string","description":"The display name of the stage. Must not be empty."},"stageType":{"enum":["open","closedWon","closedLost"],"description":"What reaching the stage means for an opportunity."},"probability":{"type":"string","format":"decimal","description":"The likelihood that an opportunity in this stage closes as won, as a percentage from 0 to 100. For example, 25 means 25%."},"orderIndex":{"type":"number","description":"Where the stage goes: the stages are ordered by this value, which must be unique among the resulting stages. Omit to place the stage after every other stage."},"isDeactivated":{"type":"boolean","description":"Whether the stage starts out retired. Defaults to false."}},"additionalProperties":false,"required":["stageName","stageType","probability"]},"description":"New stages to add. Omit for none.","examples":[[{"stageName":"Proposal","stageType":"open","probability":"50","orderIndex":2}]]},"updateStages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the stage to change. It must belong to this entity."},"stageName":{"type":"string","description":"The new display name. Must not be empty. Omit to leave unchanged."},"stageType":{"enum":["open","closedWon","closedLost"],"description":"The new stage type. Omit to leave unchanged."},"probability":{"type":"string","format":"decimal","description":"The new probability, as a percentage from 0 to 100. Omit to leave unchanged."},"orderIndex":{"type":"number","description":"Where the stage goes: the stages are ordered by this value, which must be unique among the resulting stages. Omit to leave unchanged."},"isDeactivated":{"type":"boolean","description":"Whether the stage is retired. A stage that has opportunities cannot be deactivated. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to existing stages, each keyed by the stage's id. Omit for none.","examples":[[{"id":"5b0e7c3a-2f6d-4a8b-9c1e-7d4f3a2b1c09","orderIndex":3},{"id":"0e3a9f41-6c2b-4d7e-8a15-2b9c7d4e6f10","stageName":"Contract Sent"}]]},"deleteStages":{"type":"array","items":{"type":"string"},"description":"The ids of the stages to delete. A stage that has opportunities cannot be deleted. Omit for none.","examples":[["7d1c2b3a-9e8f-4a6b-b5c4-3d2e1f0a9b87"]]}},"additionalProperties":false},"listProspectsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the prospect."},"prospectNumber":{"type":"string","description":"The prospect number, for example 'PR-1042'. Absent while none has been assigned."},"prospectName":{"type":"string","description":"The name of the prospect organization."},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to."},"crmId":{"type":"string","description":"The identifier of this prospect in the external CRM system it was integrated from."},"customerType":{"type":"string","description":"The commercial relationship. Possible values: 'default', 'partner', 'endCustomer'."},"dataSource":{"type":"string","description":"The system the prospect came from, for example 'Salesforce' or 'HubSpot'. Prospects created in Lensing have the value 'Everest'."},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'."},"entityId":{"type":"string","description":"The legal entity that owns the prospect."},"entityName":{"type":"string","description":"The name of the legal entity that owns the prospect. See entityName on GET base/entities."},"customerId":{"type":"string","description":"The identifier of the customer created from this prospect. Absent until the prospect has been converted, so its presence marks a converted prospect. See id on GET accounting/customers/:id."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. soldToAddress is populated either way, so you never have to resolve this flag to read an address."},"billToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's bill-to address, with the default contact for that role. Absent when none is recorded."},"soldToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's sold-to address, with the default contact for that role. Absent when none is recorded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the prospect record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","prospectName","entityId","lastModifiedDate"]},"description":"The prospects on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","prospectNumber":"PR-1042","prospectName":"Northwind Logistics","billingEmail":"ap@northwind.example","crmId":"0035g00000ABCDEF","customerType":"default","dataSource":"Salesforce","defaultCurrency":"USD","entityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","entityName":"Acme Inc.","sameAsBillToAddress":true,"billToAddress":{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}},"soldToAddress":{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}},"lastModifiedDate":"2026-08-14T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"nextCursor":"MTA","hasMore":true}]}},"additionalProperties":false,"required":["items","pagination"]},"searchQuotesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote."},"quoteNumber":{"type":"string","description":"The system-generated quote number, for example 'QT-1042'. Absent while none has been assigned."},"quoteType":{"type":"string","description":"The kind of quote. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'."},"status":{"type":"string","description":"Where the quote stands in its business process. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Absent on a quote that has not entered the process."},"approvalStatus":{"type":"string","description":"Where the quote stands in its approval process. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Absent until the approval process has run."},"isPrimary":{"type":"boolean","description":"Whether this is the primary quote of its opportunity."},"quoteDate":{"type":"string","format":"date","description":"The date the quote was drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date."},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription on the quote starts before it."},"signDate":{"type":"string","format":"date","description":"The date the quote was signed by the customer and the legal entity. Format YYYY-MM-DD. Absent when not recorded."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to invoices created from this quote. See code on GET accounting/payment-terms."},"memo":{"type":"string","description":"A free-text memo recorded on the quote. Absent when none is set."},"needsPSACalculation":{"type":"boolean","description":"Whether the quote takes its product data from a PSA project rather than from the product catalog."},"currency":{"type":"string","description":"The currency of every amount on the quote. A quote takes the currency of its opportunity and has none of its own. Format ISO 4217, for example 'USD'."},"totalPrice":{"type":"string","format":"decimal","description":"The sum of the quote's lines before tax, less any one-time discount, in the quote's currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount applied to the whole quote, in the quote's currency."},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the quote's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'."},"billableTimeEstimate":{"type":"string","format":"decimal","description":"The estimated total of the quote's billable-time lines, in the quote's currency."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the quote's currency."},"opportunityId":{"type":"string","description":"The opportunity this quote belongs to. See id on GET crm/opportunities/:id."},"opportunityName":{"type":"string","description":"The name of the opportunity this quote belongs to. Absent when the opportunity has no name."},"opportunityNumber":{"type":"string","description":"The opportunity number of the opportunity this quote belongs to, for example 'OP-1042'. Absent while none has been assigned."},"billToAddressId":{"type":"string","description":"The bill-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it."},"salesArrangementId":{"type":"string","description":"The sales arrangement this quote is assigned to. Set on change-order quotes. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the quote record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote subscription."},"termType":{"type":"string","description":"Whether the subscription runs to a fixed end date or renews indefinitely. Possible values: 'termed', 'evergreen'."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD. Never earlier than the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Set on a termed subscription and absent on an evergreen one."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The renewal term in months. Meaningful only when autoRenew is true."},"quoteProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product."},"quoteProductNumber":{"type":"string","description":"The system-assigned number of the quote product. Absent while none has been assigned."},"productId":{"type":"string","description":"The catalog product for this quote product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product in the catalog."},"productName":{"type":"string","description":"The name of that product in the catalog."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal, with quantities or prices stepping over time."},"rampInterval":{"type":"string","description":"How the ramp steps. Possible values: 'annually', 'specificDates'. Absent unless isRampDeal is true."},"rampInvoiceTiming":{"type":"string","description":"How a ramp deal is invoiced. Possible values: 'allAtOnce', 'perInterval'. Absent unless isRampDeal is true."},"orderIndex":{"type":"number","description":"The position of this product within the quote, for display ordering."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product line."},"quoteProductLineNumber":{"type":"string","description":"The system-assigned number of the quote product line. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The catalog product line this line was priced from. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of that catalog product line."},"parentQuoteProductLineId":{"type":"string","description":"The parent line this line hangs off, as an allowance or overage line does. Absent on a top-level line."},"lineType":{"type":"string","description":"What this line charges for. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"quantity":{"type":"string","format":"decimal","description":"The quantity on this line, as a count, not an amount. For a ramp deal the per-period quantity is on each ramp instead."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount, as a decimal fraction of listPrice. For example, 0.1 is 10%. It is not an amount."},"extendedListPrice":{"type":"string","format":"decimal","description":"The list price extended across the quantity, in the quote's currency."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Set on billable-time lines."},"totalPrice":{"type":"string","format":"decimal","description":"The total for this line, in the quote's currency."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annualized recurring revenue attributed to this line, in the quote's currency."},"invoiceFrequency":{"type":"string","description":"How often this line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the price is derived from quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. For a tiered or volume model the bands are in lineTiers. For a rateCard model they are in rateCardEntries."},"pricingTerm":{"type":"string","description":"The period the unit price is quoted for. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"overConsumptionBehavior":{"type":"string","description":"What happens when consumption exceeds a prepaid balance. Possible values: 'allowNegative', 'overage'. Set on prepaid lines."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Set on prepaid lines."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Defaults to the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Absent while open-ended."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tier band."},"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Absent on the open-ended top band."},"priceModel":{"type":"string","description":"How this band prices. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["id","fromQuantity","priceModel"]},"description":"The tiered or volume pricing bands for this line, ordered by fromQuantity. An empty array unless priceModel is a banded model."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"identifier":{"type":"string","description":"The identifier of the entry, unique within its line."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. Absent when it names none. There is no endpoint for it."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"type":"string","description":"The unit the price is quoted per. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units on this entry, as a count, not an amount."},"usageType":{"type":"string","description":"What the usage represents. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. For example, 0.1 when 1 gigabyte is 0.1 credits. It is a ratio, not an amount."},"billableUnitOfMeasure":{"type":"string","description":"The unit the entry is billed in, which may differ from unitOfMeasure. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."}},"additionalProperties":false,"required":["id","identifier","unitOfMeasure"]},"description":"The rate-card pricing for this line, one entry per billable component. An empty array unless priceModel is 'rateCard'."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"description":{"type":"string","description":"What the milestone covers, as recorded on the quote."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices as a percentage. For example, 25 is 25%. It is not an amount."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The invoice milestones for this line, when it is invoiced against milestones rather than on a frequency. An empty array otherwise."}},"additionalProperties":false,"required":["id","lineType","lineTiers","rateCardEntries","invoiceMilestones"]},"description":"The priced lines of this quote product. A product has at least one."}},"additionalProperties":false,"required":["id","quoteProductLines"]},"description":"The products in this subscription, each with its priced lines."}},"additionalProperties":false,"required":["id","termType","serviceStartDate","quoteProducts"]},"description":"The subscriptions on the quote, one per subscription, each with the products under it. An empty array when the quote has no recurring products. GET crm/quotes omits it and returns the quote header alone."},"nonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product."},"quoteProductNumber":{"type":"string","description":"The system-assigned number of the quote product. Absent while none has been assigned."},"productId":{"type":"string","description":"The catalog product for this quote product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product in the catalog."},"productName":{"type":"string","description":"The name of that product in the catalog."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal, with quantities or prices stepping over time."},"rampInterval":{"type":"string","description":"How the ramp steps. Possible values: 'annually', 'specificDates'. Absent unless isRampDeal is true."},"rampInvoiceTiming":{"type":"string","description":"How a ramp deal is invoiced. Possible values: 'allAtOnce', 'perInterval'. Absent unless isRampDeal is true."},"orderIndex":{"type":"number","description":"The position of this product within the quote, for display ordering."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product line."},"quoteProductLineNumber":{"type":"string","description":"The system-assigned number of the quote product line. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The catalog product line this line was priced from. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of that catalog product line."},"parentQuoteProductLineId":{"type":"string","description":"The parent line this line hangs off, as an allowance or overage line does. Absent on a top-level line."},"lineType":{"type":"string","description":"What this line charges for. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"quantity":{"type":"string","format":"decimal","description":"The quantity on this line, as a count, not an amount. For a ramp deal the per-period quantity is on each ramp instead."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount, as a decimal fraction of listPrice. For example, 0.1 is 10%. It is not an amount."},"extendedListPrice":{"type":"string","format":"decimal","description":"The list price extended across the quantity, in the quote's currency."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Set on billable-time lines."},"totalPrice":{"type":"string","format":"decimal","description":"The total for this line, in the quote's currency."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annualized recurring revenue attributed to this line, in the quote's currency."},"invoiceFrequency":{"type":"string","description":"How often this line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the price is derived from quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. For a tiered or volume model the bands are in lineTiers. For a rateCard model they are in rateCardEntries."},"pricingTerm":{"type":"string","description":"The period the unit price is quoted for. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"overConsumptionBehavior":{"type":"string","description":"What happens when consumption exceeds a prepaid balance. Possible values: 'allowNegative', 'overage'. Set on prepaid lines."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Set on prepaid lines."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Defaults to the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Absent while open-ended."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tier band."},"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Absent on the open-ended top band."},"priceModel":{"type":"string","description":"How this band prices. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["id","fromQuantity","priceModel"]},"description":"The tiered or volume pricing bands for this line, ordered by fromQuantity. An empty array unless priceModel is a banded model."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"identifier":{"type":"string","description":"The identifier of the entry, unique within its line."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. Absent when it names none. There is no endpoint for it."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"type":"string","description":"The unit the price is quoted per. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units on this entry, as a count, not an amount."},"usageType":{"type":"string","description":"What the usage represents. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. For example, 0.1 when 1 gigabyte is 0.1 credits. It is a ratio, not an amount."},"billableUnitOfMeasure":{"type":"string","description":"The unit the entry is billed in, which may differ from unitOfMeasure. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."}},"additionalProperties":false,"required":["id","identifier","unitOfMeasure"]},"description":"The rate-card pricing for this line, one entry per billable component. An empty array unless priceModel is 'rateCard'."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"description":{"type":"string","description":"What the milestone covers, as recorded on the quote."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices as a percentage. For example, 25 is 25%. It is not an amount."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The invoice milestones for this line, when it is invoiced against milestones rather than on a frequency. An empty array otherwise."}},"additionalProperties":false,"required":["id","lineType","lineTiers","rateCardEntries","invoiceMilestones"]},"description":"The priced lines of this quote product. A product has at least one."}},"additionalProperties":false,"required":["id","quoteProductLines"]},"description":"The products on the quote that belong to no subscription, such as one-time charges, billable time and pass-through expenses. An empty array when every product is under a subscription. GET crm/quotes omits it and returns the quote header alone."}},"additionalProperties":false,"required":["id","quoteType","isPrimary","quoteDate","serviceStartDate","paymentTerm","opportunityId","lastModifiedDate","subscriptions","nonRecurringProducts"]},"description":"The quotes on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quoteNumber":"QT-1042","quoteType":"new","status":"approved","approvalStatus":"approved","isPrimary":true,"quoteDate":"2026-08-01","serviceStartDate":"2026-09-01","signDate":"2026-08-14","paymentTerm":"NET30","memo":"Two-year platform subscription, renegotiated after the pilot.","needsPSACalculation":false,"currency":"USD","totalPrice":"48000.00","oneTimeDiscountAmount":"2000.00","oneTimeDiscountAllocation":"firstInvoice","opportunityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","opportunityName":"Northwind — platform expansion","opportunityNumber":"OPP-2291","billToAddressId":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","soldToAddressId":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","lastModifiedDate":"2026-08-14T09:12:44.000Z","subscriptions":[{"id":"c2e1f4a7-8b90-4d33-9a15-6f7e8d2b0c41","termType":"termed","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","autoRenew":true,"renewalTerm":12,"quoteProducts":[{"id":"d4f2a1b8-3c67-4e05-8b92-1a7d0e6c5f38","quoteProductNumber":"QP-3","productId":"e5a3b2c9-4d78-4f16-9c03-2b8e1f7d6a49","productCode":"PLATFORM-ENT","productName":"Platform — Enterprise","isRampDeal":false,"orderIndex":1,"quoteProductLines":[{"id":"f6b4c3d0-5e89-4a27-8d14-3c9f2a8e7b50","quoteProductLineNumber":"QPL-7","productLineId":"a7c5d4e1-6f90-4b38-9e25-4d0a3b9f8c61","productLineName":"Enterprise seats","lineType":"recurring","quantity":"100.00","listPrice":"480.00","unitPrice":"400.00","discountPercentage":"0.166667","totalPrice":"40000.00","invoiceFrequency":"annually","priceModel":"tiered","pricingTerm":"annually","unitOfMeasure":"seat","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","orderIndex":1,"lineTiers":[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","fromQuantity":"1.00","toQuantity":"50.00","priceModel":"tiered","unitPrice":"440.00","listPrice":"480.00"},{"id":"c9e7f6a3-8b12-4d50-9a47-6f2c5d1b0e83","fromQuantity":"51.00","priceModel":"tiered","unitPrice":"400.00","listPrice":"480.00"}],"rateCardEntries":[],"invoiceMilestones":[]}]}]}],"nonRecurringProducts":[{"id":"d0f8a7b4-9c23-4e61-8b58-7a3d6e2c1f94","quoteProductNumber":"QP-4","productId":"e1a9b8c5-0d34-4f72-9c69-8b4e7f3d2a05","productCode":"ONBOARD","productName":"Onboarding","orderIndex":2,"quoteProductLines":[{"id":"f2b0c9d6-1e45-4a83-8d70-9c5f8a4e3b16","productLineId":"a3c1d0e7-2f56-4b94-9e81-0d6a9b5f4c27","productLineName":"Implementation","lineType":"oneTime","quantity":"1.00","listPrice":"10000.00","unitPrice":"10000.00","totalPrice":"10000.00","invoiceFrequency":"milestone","priceModel":"flat","unitOfMeasure":"each","lineTiers":[],"rateCardEntries":[],"invoiceMilestones":[{"id":"b4d2e1f8-3a67-4c05-9f92-1e7b0c6d5a38","description":"Kick-off","totalPrice":"5000.00","percentage":"50.0000","projectedDate":"2026-09-15"}]}]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchQuotesInput":{"type":"object","properties":{"text":{"type":"string","description":"Limits results to quotes whose memo contains this text. The match is case-insensitive. Omit to match every quote.","examples":["renegotiated"]},"quoteNumber":{"type":"string","description":"Limits results to the quote with this number, for example 'QT-1042'. The match is exact."},"quoteType":{"type":"array","items":{"enum":["new","upsell","renewal","changeOrder"]},"description":"Limits results to quotes of any of these kinds. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'. Omit or pass an empty array for every kind.","examples":[["changeOrder"]]},"status":{"type":"array","items":{"enum":["created","underApproval","approved","underSigning","signed","completed"]},"description":"Limits results to quotes in any of these business states. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Omit or pass an empty array for every state."},"approvalStatus":{"type":"array","items":{"enum":["pendingSubmission","pendingApproval","approved","rejected"]},"description":"Limits results to quotes in any of these approval states. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Omit or pass an empty array for every state.","examples":[["pendingApproval","approved"]]},"isPrimary":{"type":"boolean","description":"Limits results to primary quotes when true, or non-primary quotes when false. Omit for both."},"opportunityId":{"type":"string","description":"Limits results to quotes of this opportunity. Omit for every opportunity."},"salesArrangementId":{"type":"string","description":"Limits results to quotes of this sales arrangement. Omit for every arrangement."},"quoteDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest quote date to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","description":"The latest quote date to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the date the quote was drawn up. Both bounds are inclusive, and omitting one leaves that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the quote last changed, in UTC. Both bounds are inclusive, and omitting one leaves that side open."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of quotes per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"createQuoteOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the created quote. See id on GET crm/quotes/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createQuoteInput":{"type":"object","properties":{"quoteType":{"enum":["new","changeOrder"],"description":"The type of quote. A 'new' quote sells to an opportunity; a 'changeOrder' quote amends the sales arrangement named by salesArrangementId. Defaults to 'new'."},"opportunityId":{"type":"string","description":"The opportunity the quote belongs to. Its currency governs every amount below. See id on GET crm/opportunities/:id. Required on a 'new' quote, not accepted on a 'changeOrder' one.","examples":["a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"]},"salesArrangementId":{"type":"string","description":"The sales arrangement a 'changeOrder' quote amends. See salesArrangementId on GET accounting/sales-orders/:id. Required on a 'changeOrder' quote, not accepted on a 'new' one. Every amount below is then in the arrangement's currency."},"quoteDate":{"type":"string","format":"date","description":"The date the quote is drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date.","examples":["2026-08-01"]},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription may start before it.","examples":["2026-09-01"]},"paymentTerm":{"type":"string","description":"The code of the payment term for invoices created from this quote. See code on GET accounting/payment-terms.","examples":["NET30"]},"billToAddressId":{"type":"string","description":"The address to bill. The quote stores its own copy of it. Required on a 'new' quote; a 'changeOrder' quote takes the customer's default bill-to address.","examples":["6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02"]},"soldToAddressId":{"type":"string","description":"The address the products are sold to. The quote stores its own copy of it. Required on a 'new' quote; a 'changeOrder' quote takes the customer's default sold-to address.","examples":["6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02"]},"isPrimary":{"type":"boolean","description":"Whether this becomes the primary quote of its opportunity, replacing the current one. Defaults to false.","examples":[true]},"memo":{"type":"string","description":"A free-text memo for the quote.","examples":["Two-year platform subscription."]},"signDate":{"type":"string","format":"date","description":"The date the quote was signed. Format YYYY-MM-DD."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount on the whole quote, in the opportunity's currency. Requires oneTimeDiscountAllocation."},"oneTimeDiscountAllocation":{"enum":["firstInvoice","alignToInvoiceFrequency","custom"],"description":"How oneTimeDiscountAmount is spread across the quote's invoices."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the opportunity's currency. Only allowed when the quote has a billable-time line."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"termType":{"enum":["termed","evergreen"],"description":"Whether the subscription runs to a fixed end date or renews indefinitely."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Required on a termed subscription."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The renewal term in months."},"quoteProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal."},"rampInterval":{"enum":["annually","specificDates"],"description":"How the ramp steps. Only with isRampDeal."},"rampInvoiceTiming":{"enum":["allAtOnce","perInterval"],"description":"How a ramp deal is invoiced. Only with isRampDeal."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the opportunity's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the opportunity's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the opportunity's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the opportunity's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the opportunity's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the opportunity's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line, from quantity zero up to an open-ended top band."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the opportunity's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the opportunity's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the opportunity's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"The products in this subscription. Each must carry only subscription line types."}},"additionalProperties":false,"required":["termType","serviceStartDate","quoteProducts"]},"description":"The subscriptions on the quote, each with the products under it. Send an empty array for none.","examples":[[{"termType":"termed","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","autoRenew":true,"renewalTerm":12,"quoteProducts":[{"productId":"e5a3b2c9-4d78-4f16-9c03-2b8e1f7d6a49","quoteProductLines":[{"productLineId":"a7c5d4e1-6f90-4b38-9e25-4d0a3b9f8c61","quantity":"100","listPrice":"480.00","unitPrice":"400.00","discountAmount":"80.00","discountPercentage":"16.6667","invoiceFrequency":"annually","priceModel":"perUnit","pricingTerm":"annually","unitOfMeasure":"seat","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31"}]}]}]]},"nonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the opportunity's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the opportunity's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the opportunity's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the opportunity's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the opportunity's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the opportunity's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line, from quantity zero up to an open-ended top band."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the opportunity's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the opportunity's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the opportunity's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one. Each must carry a non-subscription line type."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"The products that belong to no subscription, such as one-time charges and billable time. Send an empty array for none.","examples":[[]]}},"additionalProperties":false,"required":["quoteDate","serviceStartDate","paymentTerm","subscriptions","nonRecurringProducts"]},"searchProspectsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the prospect."},"prospectNumber":{"type":"string","description":"The prospect number, for example 'PR-1042'. Absent while none has been assigned."},"prospectName":{"type":"string","description":"The name of the prospect organization."},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to."},"crmId":{"type":"string","description":"The identifier of this prospect in the external CRM system it was integrated from."},"customerType":{"type":"string","description":"The commercial relationship. Possible values: 'default', 'partner', 'endCustomer'."},"dataSource":{"type":"string","description":"The system the prospect came from, for example 'Salesforce' or 'HubSpot'. Prospects created in Lensing have the value 'Everest'."},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'."},"entityId":{"type":"string","description":"The legal entity that owns the prospect."},"entityName":{"type":"string","description":"The name of the legal entity that owns the prospect. See entityName on GET base/entities."},"customerId":{"type":"string","description":"The identifier of the customer created from this prospect. Absent until the prospect has been converted, so its presence marks a converted prospect. See id on GET accounting/customers/:id."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. soldToAddress is populated either way, so you never have to resolve this flag to read an address."},"billToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's bill-to address, with the default contact for that role. Absent when none is recorded."},"soldToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's sold-to address, with the default contact for that role. Absent when none is recorded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the prospect record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the prospect's bill-to address. At most one contact is."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the prospect's sold-to address. At most one contact is."}},"additionalProperties":false,"required":["id","isDefaultBillToContact","isDefaultSoldToContact"]},"description":"Every contact recorded against the prospect, with the two per-role defaults flagged. An empty array when the prospect has none. GET crm/prospects/:id and POST crm/prospects/search return this array. GET crm/prospects omits it."}},"additionalProperties":false,"required":["id","prospectName","entityId","lastModifiedDate","contacts"]},"description":"The prospects on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","prospectNumber":"PR-1042","prospectName":"Northwind Logistics","billingEmail":"ap@northwind.example","crmId":"0035g00000ABCDEF","customerType":"default","dataSource":"Salesforce","defaultCurrency":"USD","entityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","entityName":"Acme Inc.","sameAsBillToAddress":true,"billToAddress":{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}},"soldToAddress":{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}},"lastModifiedDate":"2026-08-14T09:12:44.000Z","contacts":[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142","isDefaultBillToContact":true,"isDefaultSoldToContact":true},{"id":"c9e7f6a3-8b12-4d50-9a47-6f2c5d1b0e83","displayName":"Ravi Menon","salutation":"Mr","firstName":"Ravi","lastName":"Menon","emailAddress":"ravi.menon@northwind.example","isDefaultBillToContact":false,"isDefaultSoldToContact":false}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchProspectsInput":{"type":"object","properties":{"text":{"type":"string","description":"Limits results to prospects whose name contains this text. The match is case-insensitive.","examples":["northwind"]},"billingEmail":{"type":"string","description":"Limits results to the prospect with this billing email address. The match is exact."},"crmId":{"type":"string","description":"Limits results to the prospect with this identifier in the external CRM system. The match is exact."},"prospectNumber":{"type":"string","description":"Limits results to the prospect with this number, for example 'PR-1042'. The match is exact."},"customerType":{"type":"array","items":{"enum":["default","partner","endCustomer"]},"description":"Limits results to prospects of any of these commercial relationships. Possible values: 'default', 'partner', 'endCustomer'. Omit or pass an empty array for every type.","examples":[["partner","endCustomer"]]},"dataSource":{"type":"array","items":{"type":"string"},"description":"Limits results to prospects from any of these systems, for example 'Salesforce' or 'HubSpot'. Use 'Everest' for prospects created in Lensing. Omit it or send an empty array to include every system."},"defaultCurrency":{"type":"array","items":{"type":"string"},"description":"Limits results to prospects whose default currency is any of these codes. Each is an ISO 4217 code, for example 'USD'. Omit or pass an empty array for every currency.","examples":[["USD"]]},"entityId":{"type":"string","description":"Limits results to prospects owned by this legal entity. Omit for every entity."},"customerId":{"type":"string","description":"Limits results to prospects converted to this customer. Omit for every customer."},"converted":{"type":"boolean","description":"Limits results to prospects already converted to a customer when true, and to those not yet converted when false. Omit for both."},"sameAsBillToAddress":{"type":"boolean","description":"Limits results to prospects whose sold-to address repeats their bill-to address when true, and to the rest when false. Omit for both."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the prospect last changed, in UTC. Both bounds are inclusive, and omitting one leaves that side open."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of prospects per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"bulkCreateProspectsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for a created prospect."}},"additionalProperties":false,"required":["id"]},"description":"The created prospects, in the same order as the input. Match rows to inputs by index.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateProspectsInput":{"type":"object","properties":{"prospects":{"type":"array","items":{"type":"object","properties":{"prospectName":{"type":"string","description":"The name of the prospect organization. Must not be empty."},"entityId":{"type":"string","description":"The legal entity that owns the prospect. See id on GET base/entities."},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to."},"crmId":{"type":"string","description":"The identifier of this prospect in an external CRM system."},"customerType":{"enum":["default","partner"],"description":"The commercial relationship. Defaults to 'default'."},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. When true, omit soldToAddress. Defaults to false."},"billToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box. Must not be empty."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality. Must not be empty."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The prospect's bill-to address."},"soldToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box. Must not be empty."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality. Must not be empty."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The prospect's sold-to address. Required unless sameAsBillToAddress is true, and must be omitted when it is."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An existing contact to link. It must not belong to another prospect. When set, send no other contact details."},"displayName":{"type":"string","description":"The contact's display name. Required for a new contact."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at. Required for a new contact."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Defaults to false."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Defaults to false."}},"additionalProperties":false},"description":"The prospect's contacts. Each is a new contact, or an existing one linked by id."}},"additionalProperties":false,"required":["prospectName","entityId","billToAddress"]},"description":"The prospects to create, at most 100. Each takes the input of POST crm/prospects. If any entry is invalid, nothing is created.","examples":[[{"prospectName":"Northwind Logistics","entityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","sameAsBillToAddress":true,"billToAddress":{"line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"US-WA","country":"US","zipCode":"98109"}},{"prospectName":"Contoso Freight","entityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","sameAsBillToAddress":true,"billToAddress":{"line1":"1 Harbour Road","city":"Portland","stateProvince":"US-OR","country":"US","zipCode":"97201"}}]]}},"additionalProperties":false,"required":["prospects"]},"searchOpportunitiesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the opportunity."},"opportunityNumber":{"type":"string","description":"The system-generated opportunity number, for example 'OP-1042'. Absent while none has been assigned."},"entityId":{"type":"string","description":"The legal entity that owns the opportunity."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'."},"customerId":{"type":"string","description":"The identifier of the customer or prospect this opportunity is for. customerPath says which kind of record it is. Absent when it points at neither. See id on GET accounting/customers/:id for a customer, or GET crm/prospects/:id for a prospect."},"customerPath":{"type":"string","description":"Which kind of record customerId identifies. The value ends in 'Customer.id' when it is a customer and in 'Prospect.id' when it is a prospect. Absent when neither resolves."},"endCustomerId":{"type":"string","description":"The identifier of the end customer behind a partner customer. Absent unless one is on record. See id on GET accounting/customers/:id."},"priceBookId":{"type":"string","description":"The identifier of the price book quotes on this opportunity are priced from. See id on GET accounting/price-books/:id."},"stageId":{"type":"string","description":"The identifier of the stage the opportunity currently sits in: one of the stages on GET crm/opportunity-stages/:id, where :id is this opportunity's entityId."},"opportunityName":{"type":"string","description":"The free-text display name of the opportunity. Absent when none is set."},"closeDate":{"type":"string","format":"date","description":"The expected close date of the deal. Format YYYY-MM-DD. Absent when none is set."},"amount":{"type":"string","format":"decimal","description":"The expected deal amount, as a decimal in the opportunity's currency. Absent when none is set."},"crmId":{"type":"string","description":"The identifier of this opportunity in the external system it was imported from, for example a Salesforce record id. It is free text and not unique. Absent when none is set."},"dataSource":{"type":"string","description":"The system the record came from, for example 'Salesforce'. Records created in Lensing have the value 'Everest'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the opportunity record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"quotes":{"type":"array","items":{"type":"object","properties":{"quoteId":{"type":"string","description":"The identifier of the linked quote. See id on GET crm/quotes/:id."},"isPrimary":{"type":"boolean","description":"Whether this is a primary quote for the opportunity. It is not guaranteed to be true for exactly one quote."}},"additionalProperties":false,"required":["quoteId","isPrimary"]},"description":"Every quote linked to this opportunity. An empty array when it has none."}},"additionalProperties":false,"required":["id","entityId","currency","priceBookId","stageId","quotes"]},"description":"The opportunities on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchOpportunitiesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the opportunity with this id."},"opportunityNumber":{"type":"string","description":"Limits results to the opportunity with this number, for example 'OP-1042'. The match is exact."},"opportunityName":{"type":"string","description":"Limits results to opportunities whose name contains this text. The match is case-insensitive."},"entityIds":{"type":"array","items":{"type":"string"},"description":"Limits results to opportunities owned by any of these legal entities. Omit or pass an empty array for every entity."},"customerIds":{"type":"array","items":{"type":"string"},"description":"Limits results to opportunities for any of these customers or prospects, matched against either. Omit or pass an empty array for every customer."},"currencies":{"type":"array","items":{"type":"string"},"description":"Limits results to opportunities in any of these currencies. Each is an ISO 4217 code, for example 'USD'. Omit or pass an empty array for every currency."},"crmId":{"type":"string","description":"Limits results to opportunities with this external system identifier. The match is exact."},"createdDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest creation time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest creation time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the opportunity was created, in UTC. Both bounds are inclusive, and omitting one leaves that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the opportunity last changed, in UTC. Both bounds are inclusive, and omitting one leaves that side open."}},"additionalProperties":false,"description":"The filters to apply. An opportunity must match every filter you send. Omit all of them to return every opportunity you can see."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of opportunities per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return. Omit for the first page at the default size."}},"additionalProperties":false},"getProspectOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the prospect.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"prospectNumber":{"type":"string","description":"The prospect number, for example 'PR-1042'. Absent while none has been assigned.","examples":["PR-1042"]},"prospectName":{"type":"string","description":"The name of the prospect organization.","examples":["Northwind Logistics"]},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to.","examples":["ap@northwind.example"]},"crmId":{"type":"string","description":"The identifier of this prospect in the external CRM system it was integrated from.","examples":["0035g00000ABCDEF"]},"customerType":{"type":"string","description":"The commercial relationship. Possible values: 'default', 'partner', 'endCustomer'.","examples":["default"]},"dataSource":{"type":"string","description":"The system the prospect came from, for example 'Salesforce' or 'HubSpot'. Prospects created in Lensing have the value 'Everest'.","examples":["Salesforce"]},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'.","examples":["USD"]},"entityId":{"type":"string","description":"The legal entity that owns the prospect.","examples":["a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"]},"entityName":{"type":"string","description":"The name of the legal entity that owns the prospect. See entityName on GET base/entities.","examples":["Acme Inc."]},"customerId":{"type":"string","description":"The identifier of the customer created from this prospect. Absent until the prospect has been converted, so its presence marks a converted prospect. See id on GET accounting/customers/:id."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. soldToAddress is populated either way, so you never have to resolve this flag to read an address.","examples":[true]},"billToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's bill-to address, with the default contact for that role. Absent when none is recorded.","examples":[{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}}]},"soldToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's sold-to address, with the default contact for that role. Absent when none is recorded.","examples":[{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}}]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the prospect record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:44.000Z"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the prospect's bill-to address. At most one contact is."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the prospect's sold-to address. At most one contact is."}},"additionalProperties":false,"required":["id","isDefaultBillToContact","isDefaultSoldToContact"]},"description":"Every contact recorded against the prospect, with the two per-role defaults flagged. An empty array when the prospect has none. GET crm/prospects/:id and POST crm/prospects/search return this array. GET crm/prospects omits it.","examples":[[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142","isDefaultBillToContact":true,"isDefaultSoldToContact":true},{"id":"c9e7f6a3-8b12-4d50-9a47-6f2c5d1b0e83","displayName":"Ravi Menon","salutation":"Mr","firstName":"Ravi","lastName":"Menon","emailAddress":"ravi.menon@northwind.example","isDefaultBillToContact":false,"isDefaultSoldToContact":false}]]}},"additionalProperties":false,"required":["id","prospectName","entityId","lastModifiedDate","contacts"]},"getOpportunityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the opportunity."},"opportunityNumber":{"type":"string","description":"The system-generated opportunity number, for example 'OP-1042'. Absent while none has been assigned."},"entityId":{"type":"string","description":"The legal entity that owns the opportunity."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'."},"customerId":{"type":"string","description":"The identifier of the customer or prospect this opportunity is for. customerPath says which kind of record it is. Absent when it points at neither. See id on GET accounting/customers/:id for a customer, or GET crm/prospects/:id for a prospect."},"customerPath":{"type":"string","description":"Which kind of record customerId identifies. The value ends in 'Customer.id' when it is a customer and in 'Prospect.id' when it is a prospect. Absent when neither resolves."},"endCustomerId":{"type":"string","description":"The identifier of the end customer behind a partner customer. Absent unless one is on record. See id on GET accounting/customers/:id."},"priceBookId":{"type":"string","description":"The identifier of the price book quotes on this opportunity are priced from. See id on GET accounting/price-books/:id."},"stageId":{"type":"string","description":"The identifier of the stage the opportunity currently sits in: one of the stages on GET crm/opportunity-stages/:id, where :id is this opportunity's entityId."},"opportunityName":{"type":"string","description":"The free-text display name of the opportunity. Absent when none is set."},"closeDate":{"type":"string","format":"date","description":"The expected close date of the deal. Format YYYY-MM-DD. Absent when none is set."},"amount":{"type":"string","format":"decimal","description":"The expected deal amount, as a decimal in the opportunity's currency. Absent when none is set."},"crmId":{"type":"string","description":"The identifier of this opportunity in the external system it was imported from, for example a Salesforce record id. It is free text and not unique. Absent when none is set."},"dataSource":{"type":"string","description":"The system the record came from, for example 'Salesforce'. Records created in Lensing have the value 'Everest'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the opportunity record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"quotes":{"type":"array","items":{"type":"object","properties":{"quoteId":{"type":"string","description":"The identifier of the linked quote. See id on GET crm/quotes/:id."},"isPrimary":{"type":"boolean","description":"Whether this is a primary quote for the opportunity. It is not guaranteed to be true for exactly one quote."}},"additionalProperties":false,"required":["quoteId","isPrimary"]},"description":"Every quote linked to this opportunity. An empty array when it has none."}},"additionalProperties":false,"required":["id","entityId","currency","priceBookId","stageId","quotes"]},"createOpportunityStagesOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the created set of stages, which is the entity's id. The other opportunity stages endpoints are keyed by it.","examples":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"]}},"additionalProperties":false,"required":["id"]},"createOpportunityStagesInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity to create the stages for. It must be active and must not have stages yet. See id on GET base/entities.","examples":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"]},"stages":{"type":"array","items":{"type":"object","properties":{"stageName":{"type":"string","description":"The display name of the stage. Must not be empty."},"stageType":{"enum":["open","closedWon","closedLost"],"description":"What reaching the stage means for an opportunity."},"probability":{"type":"string","format":"decimal","description":"The likelihood that an opportunity in this stage closes as won, as a percentage from 0 to 100. For example, 25 means 25%."},"orderIndex":{"type":"number","description":"Where the stage goes: the stages are ordered by this value, which must be unique among them. The stored positions are 0, 1, 2 … with no gaps. Omit to place the stage after every stage that has one."},"isDeactivated":{"type":"boolean","description":"Whether the stage starts out retired. Defaults to false."}},"additionalProperties":false,"required":["stageName","stageType","probability"]},"description":"The stages to create.","examples":[[{"stageName":"Qualification","stageType":"open","probability":"20"},{"stageName":"Negotiation","stageType":"open","probability":"60"},{"stageName":"Closed Won","stageType":"closedWon","probability":"100"},{"stageName":"Closed Lost","stageType":"closedLost","probability":"0"}]]}},"additionalProperties":false,"required":["entityId","stages"]},"bulkUpdateProspectsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkUpdateProspectsInput":{"type":"object","properties":{"prospects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the prospect to change."},"prospectName":{"type":"string","description":"The name of the prospect organization. Must not be empty. Omit to leave unchanged."},"entityId":{"type":"string","description":"The legal entity that owns the prospect. See id on GET base/entities. Omit to leave unchanged."},"billingEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address invoices for this prospect would be sent to. Send null to clear, omit to leave unchanged."},"crmId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this prospect in an external CRM system. Send null to clear, omit to leave unchanged."},"customerType":{"enum":["default","partner"],"description":"The commercial relationship. Omit to leave unchanged."},"defaultCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency quotes for this prospect default to, ISO 4217. Send null to clear, omit to leave unchanged."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. Switching it on copies the bill-to address over the sold-to address. Omit to leave unchanged."},"billToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Must not be empty. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear, omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Must not be empty. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'; otherwise send an empty string to clear. Omit to leave unchanged."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty. Omit to leave unchanged."},"attention":{"type":"string","description":"The person or department that mail to this address is for. Send an empty string to clear, omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the bill-to address. Omit to leave it unchanged."},"soldToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Must not be empty. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear, omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Must not be empty. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'; otherwise send an empty string to clear. Omit to leave unchanged."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty. Omit to leave unchanged."},"attention":{"type":"string","description":"The person or department that mail to this address is for. Send an empty string to clear, omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the sold-to address. Must be omitted while sameAsBillToAddress is true."},"createContacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An existing contact to link. It must not belong to another prospect. When set, send no other contact details."},"displayName":{"type":"string","description":"The contact's display name. Required for a new contact."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at. Required for a new contact. When an existing contact has this address, that contact is linked instead of a new one, as in the app."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Defaults to false."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Defaults to false."}},"additionalProperties":false},"description":"Contacts to add to the prospect. Each is a new contact, or an existing one linked by id."},"updateContacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for a contact of the prospect."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Omit to leave unchanged."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to the role flags of contacts already on the prospect."},"deleteContacts":{"type":"array","items":{"type":"string"},"description":"The ids of contacts to remove from the prospect. The contact records are kept."}},"additionalProperties":false,"required":["id"]},"description":"The changes, at most 100, each for a different prospect. Each takes the input of PATCH crm/prospects/:id. If any entry is invalid, nothing is changed.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","billingEmail":"invoices@northwind.example"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","customerType":"partner"}]]}},"additionalProperties":false,"required":["prospects"]},"createBankAccountOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bank account.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]}},"additionalProperties":false,"required":["id"]},"createBankAccountInput":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The account's identifier in the system that owns it, for example its IBAN or ACH account number. Must be unique within the tenant.","examples":["CH9300762011623852957"]},"accountId":{"type":"string","description":"The general-ledger account this bank account posts to. See id on GET accounting/accounts/:id.","examples":["d5397c8b-6d2b-47e9-83a3-712d9180711e"]},"reconciliationStartDate":{"type":"string","format":"date","description":"The date from which transactions on this account are reconciled. Use format YYYY-MM-DD.","examples":["2026-01-01"]},"paymentAllowed":{"type":"boolean","description":"Whether outbound payments may be made from this account.","examples":[true]},"financialInstitutionId":{"type":"string","description":"The financial institution holding the account. Omit when the account is not linked to one. There is no endpoint for it."},"currency":{"type":"string","description":"The account currency. Format ISO 4217, for example 'USD'.","examples":["CHF"]},"type":{"type":"string","description":"The kind of account, as free-form text. For example 'checking' or 'saving'.","examples":["checking"]},"reference":{"type":"string","description":"The IBAN or ACH account number. When referenceType is 'QRR' this must be a Swiss QR-IBAN.","examples":["CH4431999123000889012"]},"referenceType":{"type":"string","description":"How payment references on this account are structured. Accepted values: 'QRR', 'SCOR', 'NON'.","examples":["QRR"]},"referenceNumber":{"type":"string","description":"A structured creditor reference number for this account."},"receivableAccount":{"type":"boolean","description":"Whether the account may receive incoming payments. Defaults to false.","examples":[false]}},"additionalProperties":false,"required":["externalAccountId","accountId","reconciliationStartDate","paymentAllowed"]},"searchSalesOrderOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order."},"orderNumber":{"type":"string","description":"The sales order number. Unique within the tenant. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"bookDate":{"type":"string","format":"date","description":"The date the sales order was booked. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the order's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the order's service period. Absent when isEvergreen is true. Format YYYY-MM-DD."},"signDate":{"type":"string","format":"date","description":"The date the sales order was signed. Format YYYY-MM-DD."},"salesEffectiveDate":{"type":"string","format":"date","description":"The date the contract legally takes effect. salesEffectiveDate can be earlier than signDate. Format YYYY-MM-DD."},"isEvergreen":{"type":"boolean","description":"Whether the order is evergreen, meaning at least one of its subscriptions has no end date and keeps billing until it is canceled."},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the invoices, credit memos, and debit memos created from this order are left out of the tax engine. Always false when your tenant does not allow sales orders to be excluded from the tax engine."},"term":{"type":"string","format":"decimal","description":"The length of the order's term, in months. Absent when isEvergreen is true."},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'."},"totalContract":{"type":"string","format":"decimal","description":"The total value of the order before tax, in the order currency: the sum of totalPrice across its lines minus oneTimeDiscountAmount."},"invoicedAmount":{"type":"string","format":"decimal","description":"The amount invoiced from this order so far, in the order currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"The one-time discount on the order as a whole, in the order currency."},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the order's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to the order's invoices. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"memo":{"type":"string","description":"A memo on the sales order."},"crmContractId":{"type":"string","description":"The identifier of the contract this order came from, in an external CRM system."},"salesArrangement":{"type":"string","description":"The number of the sales arrangement this order belongs to. No endpoint returns sales arrangements."},"salesArrangementId":{"type":"string","description":"The sales arrangement this order belongs to. No endpoint returns sales arrangements."},"paymentTermId":{"type":"string","description":"The payment term applied to the order's invoices. See id on GET accounting/payment-terms."},"opportunityId":{"type":"string","description":"The identifier of the opportunity this order came from, in an external CRM system."},"opportunityName":{"type":"string","description":"The name of the opportunity this order came from."},"dataSource":{"type":"string","description":"The system the order came from. Examples: 'Salesforce', 'NetSuite'."},"priceBookId":{"type":"string","description":"The price book the order's list prices come from. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The name of the price book the order's list prices come from. See priceBookName on GET accounting/price-books/:id."},"externalizedInvoicing":{"type":"boolean","description":"Whether another system invoices this order. When true, no invoice plans are created for the order."},"customer":{"type":"object","properties":{"id":{"type":"string","description":"The customer's identifier. See id on GET accounting/customers/:id."},"customerNumber":{"type":"string","description":"The customer number. Example: 'CUS-789012'."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to."},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"segment":{"type":"string","description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax."}},"additionalProperties":false,"required":["id","name"],"description":"The customer this order is for."},"entityId":{"type":"string","description":"The legal entity that owns this sales order. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this sales order. See entityName on GET base/entities."},"entityNumber":{"type":"string","description":"The number of the legal entity that owns this sales order. See entityNumber on GET base/entities."},"soldToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The sold-to address of the order. It is the customer address used to calculate tax."},"billToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The bill-to address of the order."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The subscription's identifier. See id on GET accounting/subscriptions/:id."},"subscriptionNumber":{"type":"string","format":"decimal","description":"The subscription number. See subscriptionNumber on GET accounting/subscriptions/:id."},"externalSubscriptionId":{"type":"string","description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"serviceStartDate":{"type":"string","format":"date","description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The latest service end date across all of the subscription's lines, including lines from other orders. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"products":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"The code of the product. See productCode on GET accounting/products/:id."},"productId":{"type":"string","description":"The product ordered on this line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line ordered on this line. See id on GET accounting/product-lines/:id."},"productName":{"type":"string","description":"The product's current name. See productName on GET accounting/products/:id."},"salesOrderProductLineId":{"type":"string","description":"The unique identifier for this order line. On a ramp deal, the identifier of the earliest ramp's line. The other ramps' line identifiers are not returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered on this line. On a ramp deal, it is the first ramp's quantity."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit, in the order currency. unitPrice = listPrice - discountAmount = listPrice × (1 - discountPercentage)."},"totalPrice":{"type":"string","format":"decimal","description":"The total price of the line, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit, as a decimal fraction of listPrice. For example, 0.1 is 10%."},"invoiceFrequency":{"type":"string","description":"How often the line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'. See invoiceFrequency on GET accounting/product-lines/:id."},"invoiceTiming":{"type":"string","description":"When the line is invoiced relative to the period it covers. Possible values: 'advance' (at the start of the period), 'arrears' (at the end of the period)."},"lineInvoiceDay":{"type":"string","description":"The day of the period the line is invoiced on. Possible values: 'anniversary', 'first', 'last', 'specific'."},"priceModel":{"type":"string","description":"How the price of this order line depends on quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. See priceModel on GET accounting/product-lines/:id."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. See unitOfMeasure on GET accounting/product-lines/:id."},"pricingTerm":{"type":"string","description":"The period the unit price covers. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'. See pricingTerm on GET accounting/product-lines/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of this line's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this line's service period. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array when the line has none."},"overage":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price per unit of overage usage, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit of overage usage, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, as a decimal fraction of listPrice. For example, 0.1 is 10%. Absent when discountAmount is present."}},"additionalProperties":false,"description":"The pricing for usage above the line's allowance. Absent when the line has no overage discount."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate card entry."},"identifier":{"type":"string","description":"The identifier of the billable component this entry prices. No endpoint returns billable components."},"label":{"type":"string","description":"A description of the rate card entry."},"unitOfMeasure":{"type":"string","description":"The unit this entry is priced in, for example 'user' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in this entry's currency."},"currency":{"type":"string","description":"The currency of unitPrice. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","unitOfMeasure","unitPrice","currency"]},"description":"The rate card entries of this line. Absent when the line has none."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier starts."},"toQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier ends. Absent on the last tier, which has no upper limit."},"unitPrice":{"type":"string","format":"decimal","description":"The price for this tier, in the order currency. When priceModel is 'perUnit', it is charged for each unit priced in this tier. When priceModel is 'flat', it is charged once for the tier, whatever the number of units."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this tier before discount, in the order currency."},"priceModel":{"type":"string","description":"How unitPrice applies within this tier. Possible values: 'flat', 'perUnit'."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of this line, lowest fromQuantity first. Absent when the line has none."},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The name of the tag dimension, for example 'Department'."},"value":{"type":"string","description":"The tag value within the dimension, for example 'Engineering'."}},"additionalProperties":false,"required":["dimension","value"]},"description":"The value accounting tags of this product, as dimension and value pairs. Every line of the same product has the same tags. Absent when the product has no tags."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the order's record of this item."},"itemId":{"type":"string","description":"The inventory item. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item code of the inventory item. See itemCode on GET inventory/items/:id."},"itemName":{"type":"string","description":"The name of the inventory item."},"productName":{"type":"string","description":"The name of the product the item belongs to."},"itemOrdered":{"type":"string","format":"decimal","description":"The quantity of this item ordered: the total quantity of the product across its lines on this order. It is not multiplied by the item's quantity in the product definition."},"totalShipped":{"type":"string","format":"decimal","description":"The quantity of this item shipped so far, summed across its shipments."}},"additionalProperties":false,"required":["id","itemOrdered"]},"description":"The inventory items of this product. Every line of the same product has the same items. Absent when the product has no items or is a ramp deal."},"rampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"How the ramp periods are set. Possible values: 'annually', 'specificDates'."},"invoiceTiming":{"type":"string","description":"How the ramp deal is invoiced. Possible values: 'perInterval', 'allAtOnce'."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"The first day of this ramp. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this ramp. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity for this ramp."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit for this ramp before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit for this ramp, in the order currency."},"invoiceFrequency":{"type":"string","description":"How often this ramp is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."}},"additionalProperties":false,"required":["serviceStartDate","serviceEndDate","quantity"]},"description":"The ramps of the deal, earliest first."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Present only when the product is a ramp deal. The entry then represents the whole product, and each ramp in ramps is one of its product lines, with its own dates, quantity, and prices, earliest first. On a ramp deal, the entry has no listPrice, unitPrice, totalPrice, discountAmount, discountPercentage, serviceStartDate, serviceEndDate, items, tiers, rateCardEntries, overage, or prepaidConfiguration."},"prepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative' (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews), 'overage' (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate)."},"rolloverAtRenewal":{"type":"boolean","description":"Whether unused balance rolls over when the subscription renews."},"balance":{"type":"string","format":"decimal","description":"The prepaid units (credits) left in the balance."},"consumedAmount":{"type":"string","format":"decimal","description":"The prepaid units (credits) used so far: the quantity funded by this line minus the current balance. Absent when balance is absent."}},"additionalProperties":false,"required":["overConsumptionBehavior","rolloverAtRenewal"],"description":"The prepaid balance settings of this line. Absent when the line is not a prepaid line."}},"additionalProperties":false,"required":["productCode","productId","productLineId","quantity","externalIdentifiers"]},"description":"The product lines of this subscription on this order, one entry per product line. For a ramp deal, one entry represents the whole product, and each ramp in rampDeal.ramps is one of its product lines."}},"additionalProperties":false,"required":["products"]},"description":"The order's subscriptions, each with the product lines that belong to it. An empty array when the order has none."},"nonSubscriptionProducts":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"The code of the product. See productCode on GET accounting/products/:id."},"productId":{"type":"string","description":"The product ordered on this line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line ordered on this line. See id on GET accounting/product-lines/:id."},"productName":{"type":"string","description":"The product's current name. See productName on GET accounting/products/:id."},"salesOrderProductLineId":{"type":"string","description":"The unique identifier for this order line. On a ramp deal, the identifier of the earliest ramp's line. The other ramps' line identifiers are not returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered on this line. On a ramp deal, it is the first ramp's quantity."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit, in the order currency. unitPrice = listPrice - discountAmount = listPrice × (1 - discountPercentage)."},"totalPrice":{"type":"string","format":"decimal","description":"The total price of the line, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit, as a decimal fraction of listPrice. For example, 0.1 is 10%."},"invoiceFrequency":{"type":"string","description":"How often the line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'. See invoiceFrequency on GET accounting/product-lines/:id."},"invoiceTiming":{"type":"string","description":"When the line is invoiced relative to the period it covers. Possible values: 'advance' (at the start of the period), 'arrears' (at the end of the period)."},"lineInvoiceDay":{"type":"string","description":"The day of the period the line is invoiced on. Possible values: 'anniversary', 'first', 'last', 'specific'."},"priceModel":{"type":"string","description":"How the price of this order line depends on quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. See priceModel on GET accounting/product-lines/:id."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. See unitOfMeasure on GET accounting/product-lines/:id."},"pricingTerm":{"type":"string","description":"The period the unit price covers. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'. See pricingTerm on GET accounting/product-lines/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of this line's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this line's service period. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array when the line has none."},"overage":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price per unit of overage usage, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit of overage usage, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, as a decimal fraction of listPrice. For example, 0.1 is 10%. Absent when discountAmount is present."}},"additionalProperties":false,"description":"The pricing for usage above the line's allowance. Absent when the line has no overage discount."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate card entry."},"identifier":{"type":"string","description":"The identifier of the billable component this entry prices. No endpoint returns billable components."},"label":{"type":"string","description":"A description of the rate card entry."},"unitOfMeasure":{"type":"string","description":"The unit this entry is priced in, for example 'user' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in this entry's currency."},"currency":{"type":"string","description":"The currency of unitPrice. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","unitOfMeasure","unitPrice","currency"]},"description":"The rate card entries of this line. Absent when the line has none."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier starts."},"toQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier ends. Absent on the last tier, which has no upper limit."},"unitPrice":{"type":"string","format":"decimal","description":"The price for this tier, in the order currency. When priceModel is 'perUnit', it is charged for each unit priced in this tier. When priceModel is 'flat', it is charged once for the tier, whatever the number of units."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this tier before discount, in the order currency."},"priceModel":{"type":"string","description":"How unitPrice applies within this tier. Possible values: 'flat', 'perUnit'."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of this line, lowest fromQuantity first. Absent when the line has none."},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The name of the tag dimension, for example 'Department'."},"value":{"type":"string","description":"The tag value within the dimension, for example 'Engineering'."}},"additionalProperties":false,"required":["dimension","value"]},"description":"The value accounting tags of this product, as dimension and value pairs. Every line of the same product has the same tags. Absent when the product has no tags."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the order's record of this item."},"itemId":{"type":"string","description":"The inventory item. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item code of the inventory item. See itemCode on GET inventory/items/:id."},"itemName":{"type":"string","description":"The name of the inventory item."},"productName":{"type":"string","description":"The name of the product the item belongs to."},"itemOrdered":{"type":"string","format":"decimal","description":"The quantity of this item ordered: the total quantity of the product across its lines on this order. It is not multiplied by the item's quantity in the product definition."},"totalShipped":{"type":"string","format":"decimal","description":"The quantity of this item shipped so far, summed across its shipments."}},"additionalProperties":false,"required":["id","itemOrdered"]},"description":"The inventory items of this product. Every line of the same product has the same items. Absent when the product has no items or is a ramp deal."},"rampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"How the ramp periods are set. Possible values: 'annually', 'specificDates'."},"invoiceTiming":{"type":"string","description":"How the ramp deal is invoiced. Possible values: 'perInterval', 'allAtOnce'."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"The first day of this ramp. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this ramp. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity for this ramp."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit for this ramp before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit for this ramp, in the order currency."},"invoiceFrequency":{"type":"string","description":"How often this ramp is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."}},"additionalProperties":false,"required":["serviceStartDate","serviceEndDate","quantity"]},"description":"The ramps of the deal, earliest first."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Present only when the product is a ramp deal. The entry then represents the whole product, and each ramp in ramps is one of its product lines, with its own dates, quantity, and prices, earliest first. On a ramp deal, the entry has no listPrice, unitPrice, totalPrice, discountAmount, discountPercentage, serviceStartDate, serviceEndDate, items, tiers, rateCardEntries, overage, or prepaidConfiguration."},"prepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative' (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews), 'overage' (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate)."},"rolloverAtRenewal":{"type":"boolean","description":"Whether unused balance rolls over when the subscription renews."},"balance":{"type":"string","format":"decimal","description":"The prepaid units (credits) left in the balance."},"consumedAmount":{"type":"string","format":"decimal","description":"The prepaid units (credits) used so far: the quantity funded by this line minus the current balance. Absent when balance is absent."}},"additionalProperties":false,"required":["overConsumptionBehavior","rolloverAtRenewal"],"description":"The prepaid balance settings of this line. Absent when the line is not a prepaid line."}},"additionalProperties":false,"required":["productCode","productId","productLineId","quantity","externalIdentifiers"]},"description":"The order's product lines that belong to no subscription, with the same fields as subscriptions[].products. An empty array when the order has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to product lines do not update it."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The order's identifiers in other systems, at most one per field name. An empty array when the order has none."}},"additionalProperties":false,"required":["id","orderNumber","bookDate","currency","customer","entityId","entityNumber","soldToAddress","billToAddress","subscriptions","nonSubscriptionProducts","lastModifiedDate"]},"description":"The sales orders on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSalesOrderInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the sales order with this identifier."},"orderNumber":{"type":"string","description":"Limits results to the sales order with this order number, for example 'SO-1042'. The match is exact."},"orderType":{"type":"string","description":"Limits results to sales orders of this type. Accepted values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'. Any other value matches no sales order."},"approvalStatus":{"type":"string","description":"Limits results to sales orders with this approval status. Accepted values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Any other value matches no sales order."},"purchaseOrder":{"type":"string","description":"Limits results to sales orders with this purchase-order reference. The match is exact."},"entityId":{"type":"string","description":"Limits results to sales orders owned by this legal entity. See id on GET base/entities."},"customerId":{"type":"string","description":"Limits results to sales orders sold to this customer. See customer.id on this response or id on POST accounting/customers/search."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. A field name that is not configured for sales orders fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier in the other system. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to sales orders with this identifier in another system. Send both fieldName and value."}},"additionalProperties":false,"description":"The filters to apply. A sales order must match every filter you send. Omit to return all sales orders."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of sales orders per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"listAccountingSalesReturnsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"salesReturnNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The RMA number, for example 'SR-1'. Absent while none has been assigned."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle status of the sales return. Possible values: 'draft', 'submitted', 'received', 'approved', 'completed', 'cancelled', 'rejected'."},"returnType":{"type":"string","description":"The resolution path for the return. Possible values: 'credit', 'replacement'. It cannot be changed once status moves past 'draft'."},"returnDate":{"type":"string","format":"date","description":"The transaction date for the return. Format YYYY-MM-DD."},"salesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order this return is against. A sales return is always against exactly one sales order. See id on GET accounting/sales-orders/:id."},"currency":{"type":"string","description":"The currency of every amount on this record and its lines. Format ISO 4217, for example 'USD'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the sales return last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"paymentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment."},"paymentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment number, unique within the tenant. A human-readable reference used for reconciliation."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"The payment method. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'."},"paymentAccountCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the bank account the payment was received into. Present only when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The rate used to convert the payment currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount paid, in the payment currency."},"appliedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion already applied to invoices, in the payment currency. The sum of the payment's applications."},"unappliedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion not yet applied to any invoice, in the payment currency. unappliedAmount = amount - appliedAmount - refundAmount."},"refundAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion refunded through approved refunds, in the payment currency."},"bankFeeAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The bank fee deducted from the payment, in the payment currency."},"smallBalanceWriteOffAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total written off as a small residual balance across the payment's applications, in the payment currency."},"totalEarlyPaymentDiscount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total early-payment discount granted across the payment's applications, in the payment currency."},"customerPaymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The derived lifecycle status of the payment. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull', 'partiallyRefunded', 'refunded', 'disputed', 'chargedBack'."},"disputeStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The dispute state of the payment. Possible values: 'disputed', 'chargedBack'. Absent on an undisputed payment."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer the payment came from."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer of record the payment belongs to."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that received the payment."},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the ledger account the payment was posted to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"listRefundsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the refund."},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'."},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD."},"approvalStatus":{"type":"string","description":"The approval status. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency of the refund. Every amount on it is in this currency. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency."},"unappliedAmount":{"type":"string","format":"decimal","description":"The unapplied balance remaining on the source payment, in the refund currency."},"refundNote":{"type":"string","description":"A free-form note attached to the refund. Absent when none was set."},"customerId":{"type":"string","description":"The customer receiving the refund. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer receiving the refund."},"entityId":{"type":"string","description":"The legal entity issuing the refund. See id on GET base/entities."},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id."},"paymentNumber":{"type":"string","description":"The number of the source payment being refunded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"description":"The refunds that match, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","refundNumber":"REF-1042","refundDate":"2026-08-01","approvalStatus":"approved","refundType":"ach","currency":"USD","amount":"150.00","unappliedAmount":"0.00","customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","customerName":"Northwind Traders","entityId":"1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45","paymentId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","paymentNumber":"PMT-7781","lastModifiedDate":"2026-08-01T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor input. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more refunds remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingProductLinesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product line."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"type":"string","description":"The display name of the product. See productName on GET accounting/products/:id."},"productLineNumber":{"type":"string","description":"The product line number, assigned by the system and unique within the tenant. Example: 'PL-1001'."},"name":{"type":"string","description":"The name of the product line."},"lineType":{"type":"string","description":"The type of product line. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"priceModel":{"type":"string","description":"How the product line is priced. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"taxMode":{"type":"string","description":"How the product line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'. Absent if no tax provider was enabled in your tenant when the product line was last saved."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"hasUsage":{"type":"boolean","description":"Whether the product line has a paired 'usage' line. True for 'prepaid' lines, and for 'recurring' lines whose priceModel is 'thresholdBased' or whose commitInvoicing has a value."},"hasBeenUsed":{"type":"boolean","description":"Whether the product line is on at least one sales order."},"commitInvoicing":{"type":"string","description":"When the minimum spend commit of a 'recurring' product line is invoiced. Possible values: 'advance', 'arrears'. Absent when the product line has no minimum spend commit."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative', 'overage'. Applies only when lineType is 'prepaid'."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal. Applies only when lineType is 'prepaid'."},"parentProductLineId":{"type":"string","description":"The product line this 'usage' line is paired with. See id on GET accounting/product-lines/:id. Absent when the product line is not a paired 'usage' line."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the product line was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product line last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax record."},"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"engine":{"type":"string","description":"The tax engine that computes this tax. Possible values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."}},"additionalProperties":false,"required":["id","taxCode","engine"]},"description":"The tax records of the product line. Absent when the product line has none."},"pricingHeaders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header. See id on GET accounting/pricing/:id."},"headerNumber":{"type":"string","description":"The pricing header number, assigned by the system and unique within the tenant."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book entry."},"priceBookEntryNumber":{"type":"string","description":"The price book entry number, assigned by the system."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. On a rate-card entry, the list price is the rate."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Used only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Absent on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"rateCardEntry":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Absent when no price model was set on the rate-card entry."}},"additionalProperties":false,"required":["id","unitOfMeasure"],"description":"The rate-card entry attached to this price book entry. Absent when the entry is not rate-card priced."}},"additionalProperties":false,"required":["id"]},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["id","currency","validFrom","priceBookEntries"]},"description":"The pricing headers of the product line, each with its price book entries. Absent when the product line has no pricing."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the product line has none."}},"additionalProperties":false,"required":["id","productId","name","lastModifiedDate"]},"description":"The product lines on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more product lines remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingProductLinesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"term":{"type":"string","description":"Limits results to product lines whose name or product line number contains this text. The match is case-insensitive."},"productId":{"type":"string","description":"Limits results to the product lines of this product. See id on GET accounting/products/:id."},"productLineNumber":{"type":"string","description":"Limits results to the product line with this product line number. The match is exact."},"crmProductId":{"type":"string","description":"Limits results to product lines with this CRM identifier. The match is exact."},"lineType":{"type":"string","description":"Limits results to product lines of this type. Accepted values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"priceModel":{"type":"string","description":"Limits results to product lines with this price model. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"pricingTerm":{"type":"string","description":"Limits results to product lines with this pricing term. Accepted values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"invoiceFrequency":{"type":"string","description":"Limits results to product lines with this invoice frequency. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"unitOfMeasure":{"type":"string","description":"Limits results to product lines with this unit of measure. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"taxMode":{"type":"string","description":"Limits results to product lines with this tax mode. Accepted values: 'TaxInclusive', 'TaxExclusive'."},"enforceListPrice":{"type":"boolean","description":"Limits results to product lines that enforce, or do not enforce, the list price."},"hasUsage":{"type":"boolean","description":"Limits results to product lines that have, or do not have, a paired 'usage' line."},"parentProductLineId":{"type":"string","description":"Limits results to the 'usage' line paired with this product line. See id on GET accounting/product-lines/:id."},"dataSource":{"type":"string","description":"Limits results to product lines from this source system or import job. The match is exact. Example: 'Salesforce'."},"createdDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the product line was created. Bounds are inclusive."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the product line last changed. Bounds are inclusive."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label. A name that is not configured for product lines fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier's value in the source system. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to product lines with this external identifier. Send both fieldName and value."}},"additionalProperties":false,"description":"The filters to apply. A product line must match every filter you send. Omit to return all product lines."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of product lines per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"getPriceBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book."},"priceBookName":{"type":"string","description":"The display name of the price book, unique within the tenant and compared case-insensitively."},"priceBookNumber":{"type":"string","description":"The price book number, for example 'PB-000123'. Absent until a number range assigns one."},"description":{"type":"string","description":"A free-form description of the price book. Absent when none is set."},"active":{"type":"boolean","description":"Whether the price book is active and usable in transactions."},"isStandard":{"type":"boolean","description":"Whether this is the standard (default) price book. Only one price book is the standard at a time. It cannot be set through this API."},"dataSource":{"type":"string","description":"The source system that provided the price book data. Absent when none is set."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the price book was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the price book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","priceBookName","lastModifiedDate"]},"searchChartOfAccountsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the chart of accounts."},"name":{"type":"string","description":"The display name of the chart of accounts."},"accountNumbering":{"type":"string","description":"How account numbers are assigned within this chart of accounts. Possible values: 'hierarchical' (numbers follow the account's position in the hierarchy), 'manual' (numbers are assigned by hand)."},"accountNumberingDigits":{"type":"string","description":"The total width of an account number, which caps how deep the hierarchy can go. Possible values: 'sixDigits' (up to 4 levels), 'sevenDigits' (5), 'eightDigits' (6), 'nineDigits' (7), 'tenDigits' (8). Absent when no width was set. A width and the numbering strategy are independent, so check this field directly rather than inferring it from accountNumbering."},"description":{"type":"string","description":"A free-form description of the chart of accounts. Absent when none was set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the chart-of-accounts record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","accountNumbering","lastModifiedDate"]},"description":"The charts of accounts that match, ordered by name. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchChartOfAccountsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the chart of accounts with this identifier. The match is exact. A value that is not a valid identifier matches nothing."},"name":{"type":"string","description":"Limits results to charts of accounts whose name contains this text. The match is case-insensitive, and '%' and '_' match themselves rather than acting as wildcards. An empty or blank value matches nothing."},"description":{"type":"string","description":"Limits results to charts of accounts whose description contains this text. The match is case-insensitive."},"accountNumbering":{"type":"string","description":"Limits results to charts of accounts with this numbering strategy. Possible values: 'hierarchical', 'manual'. Any other value matches nothing."},"accountNumberingDigits":{"type":"string","description":"Limits results to charts of accounts with this account-number width. Possible values: 'sixDigits', 'sevenDigits', 'eightDigits', 'nineDigits', 'tenDigits'. Any other value matches nothing. A width and the numbering strategy are independent."}},"additionalProperties":false,"description":"The filters to apply. A chart of accounts must match every filter you send. Omit to return all charts of accounts."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of charts of accounts per page, between 1 and 200. Defaults to 50. A value outside that range fails with INVALID_PAGE_SIZE rather than being adjusted."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"ingestUsageOutput":{"type":"object","properties":{"data":{"type":"object","properties":{"dataExtractionId":{"type":"number","description":"The identifier of the ingestion job. Pass it to GET accounting/usages/ingestions to poll per-record results."}},"additionalProperties":false,"required":["dataExtractionId"],"description":"The accepted ingestion job."}},"additionalProperties":false,"required":["data"]},"ingestUsageInput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"usageIdentifier":{"type":"string","description":"The subscription the usage belongs to: its external subscription ID or its internal subscription number (SUB-...). A customer name is also accepted when that customer has exactly one subscription. It does not identify the usage record: a record for the same subscription line, usage component, unit of measure and dateTime replaces the current one."},"dateTime":{"type":"string","description":"The date or date and time the usage was recorded against. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'."},"quantity":{"type":"string","description":"The quantity of usage, as a decimal string to keep precision. Send 0 to reset the usage recorded for the period."},"usageComponent":{"type":"string","description":"The billable component this usage maps to, by name or identifier. Omit to have it resolved from productIdentifier and unitOfMeasure."},"productIdentifier":{"type":"string","description":"The product code or identifier this usage is attributed to. It is used to resolve the billable component when usageComponent is omitted."},"description":{"type":"string","description":"A free-form description of the usage record, returned by GET accounting/usages/{id}. Omit to leave it unset. It does not take part in matching, so changing it does not create a new record."},"trackId":{"type":"string","description":"An identifier you supply to track this row through GET accounting/usages/ingestions."}},"additionalProperties":false,"required":["usageIdentifier","dateTime","unitOfMeasure","quantity"]},"description":"The usage records to ingest, in the default usage ingestion schema."},"mapping":{"type":"string","description":"The column mapping to apply. Defaults to 'Usage API Mapping' when omitted."},"sync":{"type":"boolean","description":"Whether to wait until ingestion finishes before responding. Defaults to false, which returns at once with a dataExtractionId to poll with GET accounting/usages/ingestions."}},"additionalProperties":false,"required":["items"]},"createSalesOrderShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created sales order shipment.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createSalesOrderShipmentInput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The approved sales order to ship. Its inventory products and their items define what goes on the shipment. See id on GET accounting/sales-orders/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL to record on the shipment. Omit to leave it unset."},"carrier":{"type":"string","description":"The name of the carrier handling the shipment. Omit to leave it unset.","examples":["DHL"]},"incoterm":{"type":"string","description":"The incoterm governing shipping responsibility. For example 'DAP' or 'EXW'. Omit to leave it unset.","examples":["DAP"]},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. Omit to leave it unset. See id on GET inventory/warehouses/:id."},"shipToContactEmail":{"type":"string","description":"The email of the contact who receives this shipment. Omit to leave it unset."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer asked for delivery. Use format YYYY-MM-DD. Omit to leave it unset."},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment is expected to be delivered. Use format YYYY-MM-DD. Omit to leave it unset."}},"additionalProperties":false,"required":["salesOrderId"]},"searchAccountingSalesReturnOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"salesReturnNumber":{"type":"string","description":"The RMA number, for example 'SR-1'. Absent while none has been assigned."},"status":{"type":"string","description":"The lifecycle status of the sales return. Possible values: 'draft', 'submitted', 'received', 'approved', 'completed', 'cancelled', 'rejected'."},"returnType":{"type":"string","description":"The resolution path for the return. Possible values: 'credit', 'replacement'. It cannot be changed once status moves past 'draft'."},"returnDate":{"type":"string","description":"The transaction date for the return. Format YYYY-MM-DD."},"salesOrderId":{"type":"string","description":"The sales order this return is against. A sales return is always against exactly one sales order. See id on GET accounting/sales-orders/:id."},"currency":{"type":"string","description":"The currency of every amount on this record and its lines. Format ISO 4217, for example 'USD'."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return. Possible values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'. It is for reporting and does not affect how the return is resolved."},"notes":{"type":"string","description":"Free-form notes for the return."},"returnTrackingNumber":{"type":"string","description":"The carrier tracking number for the inbound return shipment."},"totalReturnAmount":{"type":"string","format":"decimal","description":"The total return amount, the sum of every line's totalPrice, in the return currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund, such as a restocking fee, in the return currency. Credit returns only. It is set either here or on the lines, never both."},"shippingRefundAmount":{"type":"string","format":"decimal","description":"The shipping charge refunded to the customer, in the return currency. Credit returns only."},"totalRevenueImpact":{"type":"string","format":"decimal","description":"The revenue reversed to the customer, the product-line revenue impact plus the shipping refund, in the return currency. Always 0 for the replacement path."},"revenueStatus":{"type":"string","description":"The revenue reversal status. Possible values: 'notApplicable', 'notStarted', 'reversed'. 'notApplicable' is the replacement path, and 'reversed' is a completed credit return."},"inventoryReturnNumber":{"type":"string","description":"The document number of the linked inventory sales return. Absent until one has been created."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales return last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this return line."},"salesOrderProductLineId":{"type":"string","description":"The sales order product line this line returns. See salesOrderProductLineId on GET accounting/sales-orders/:id."},"lineType":{"type":"string","description":"The product line type, copied from the sales order line at creation."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned."},"unitOfMeasure":{"type":"string","description":"The unit of measure, copied from the sales order line."},"currency":{"type":"string","description":"The currency of unitPrice, totalPrice and returnFeeAmount on this line, copied from the sales return. Format ISO 4217, for example 'USD'."},"unitPrice":{"type":"string","format":"decimal","description":"The unit price, copied from the sales order line at creation, in this line's currency."},"totalPrice":{"type":"string","format":"decimal","description":"The total price for the line, quantity times unitPrice, in this line's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund for this line, in this line's currency. Credit returns only. Set only when fees are tracked per line rather than on the header."},"revenueImpactAmount":{"type":"string","format":"decimal","description":"The revenue reversed for this line, in this line's currency. 0 for the replacement path."},"lineStatus":{"type":"string","description":"The lifecycle status of this line. Possible values: 'pending', 'received', 'approved', 'completed', 'cancelled', 'rejected'."}},"additionalProperties":false,"required":["id","salesOrderProductLineId","lineType","quantity","unitOfMeasure","currency","unitPrice","lineStatus"]},"description":"The product lines being returned."}},"additionalProperties":false,"required":["id","status","returnType","returnDate","salesOrderId","currency","lastModifiedDate","lines"]},"description":"The sales returns on this page, oldest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more sales returns remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingSalesReturnInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the sales return with this identifier."},"salesReturnNumber":{"type":"string","description":"Limits results to the sales return with this RMA number, for example 'SR-104'."},"status":{"type":"array","items":{"type":"string"},"description":"Limits results to sales returns in any of these statuses. Accepted values: 'draft', 'submitted', 'received', 'approved', 'completed', 'cancelled', 'rejected'. An unknown value matches nothing. An empty array does not constrain."},"returnType":{"type":"array","items":{"type":"string"},"description":"Limits results to sales returns of any of these resolution paths. Accepted values: 'credit', 'replacement'. An unknown value matches nothing. An empty array does not constrain."},"reasonCode":{"type":"array","items":{"type":"string"},"description":"Limits results to sales returns with any of these header-level reasons. Accepted values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'. An empty array does not constrain."},"salesOrderId":{"type":"string","description":"Limits results to sales returns raised against the sales order with this identifier. An identifier matching no sales order returns an empty page."},"currency":{"type":"string","description":"Limits results to sales returns in this currency. Format ISO 4217, for example 'USD'."},"notes":{"type":"string","description":"Limits results to sales returns whose notes contain this text. The match is case-insensitive."},"returnTrackingNumber":{"type":"string","description":"Limits results to the sales return with this carrier tracking number."},"returnDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest date to include. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest date to include. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to sales returns whose returnDate falls in this range. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest time to include, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest time to include, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to sales returns changed in this range, for polling an incremental sync. Omit either bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A sales return must match every filter you send. Omit to return all sales returns."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of sales returns per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"searchCreditCardEntryOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit card entry."},"creditCardEntryNumber":{"type":"string","description":"The credit card entry number. Absent until one has been assigned."},"name":{"type":"string","description":"The display name of the credit card entry."},"description":{"type":"string","description":"A free-form description of the entry."},"transactionDate":{"type":"string","format":"date","description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"type":"string","description":"The reconciliation status of the entry. Possible values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"type":"string","description":"A label for the source system the entry was created from."},"externalUrl":{"type":"string","description":"A link to the source document in an external system."},"creditCardAccountId":{"type":"string","description":"The credit card general-ledger account this entry is recorded against. See id on GET accounting/accounts/:id."},"creditCardAccountName":{"type":"string","description":"The name of the credit card general-ledger account."},"entityId":{"type":"string","description":"The legal entity this entry is posted under. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the credit card entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A free-form description of the line."},"lineType":{"type":"string","description":"The kind of line. Possible values: 'oneTime', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The gross line amount, including VAT, in the entry currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217. It always matches the entry currency."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the entry currency."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount on the line, in the entry currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%."},"origin":{"type":"string","description":"A label for the source system, copied onto the line from the entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. To read its schedule lines, pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted entry reads 'notStarted' until the entry posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id. Absent on a schedule that has no schedule lines yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far by the schedule lines whose journal entries are posted, in the entry currency. Zero until the first schedule line's journal entry is posted."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. To read the schedule lines, use GET accounting/amortization-schedule-lines and filter on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The posting lines of the entry, one per general-ledger posting. An empty array when the entry has none."}},"additionalProperties":false,"required":["id","transactionDate","status","lastModifiedDate"]},"description":"The credit card entries on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor to pass as page.cursor for the next page. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchCreditCardEntryInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the credit card entry with this identifier."},"creditCardEntryNumber":{"type":"string","description":"Limits results to the credit card entry with this number. The match is exact."},"journalEntryNumber":{"type":"string","description":"Limits results to entries that posted to the journal entry with this number. The match is exact."},"status":{"type":"string","description":"Limits results to entries in this status. Accepted values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'. Any other value matches nothing."},"currency":{"type":"string","description":"Limits results to entries denominated in this currency. Format ISO 4217, for example 'USD'."},"creditCardAccountId":{"type":"string","description":"Limits results to entries recorded against this credit card general-ledger account. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"Limits results to entries posted under this legal entity. See id on GET base/entities."},"origin":{"type":"string","description":"Limits results to entries created by this source system. The match is exact."}},"additionalProperties":false,"description":"The filters to apply. A credit card entry must match every filter you send. Omit to return all credit card entries.","examples":[{"status":"Unmatched"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of credit card entries per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"createCreditMemoOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created credit memo. Read the full record with GET accounting/credit-memos/:id."}},"additionalProperties":false,"required":["id"]},"createCreditMemoInput":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer the credit memo is issued to. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity issuing the credit memo. See id on GET base/entities."},"currency":{"type":"string","description":"The currency of the credit memo. Every amount on the credit memo is in this currency. Format ISO 4217, for example 'USD'."},"creditMemoDate":{"type":"string","format":"date","description":"The date the credit memo is issued. Use format YYYY-MM-DD."},"manualCreditMemoType":{"type":"string","description":"The reason for the credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Although the field is optional in the schema, a credit memo cannot be created without it."},"description":{"type":"string","description":"A free-form description of the credit memo."},"externalCreditMemoId":{"type":"string","description":"The identifier of this credit memo in an external source system."},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"The line description, as shown to the customer."},"totalPrice":{"type":"string","format":"decimal","description":"The line total before tax, in the credit memo currency."}},"additionalProperties":false,"required":["description","totalPrice"]},"description":"The lines of the credit memo. At least one is required, even when the request also has applications. Each line has a description and a total price. Tax is added internally."},"applications":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice this application targets. See id on GET accounting/invoices/:id."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount to apply, in the credit memo currency. Must be positive."},"appliedDate":{"type":"string","format":"date","description":"The date the application is recorded. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["invoiceId","appliedAmount","appliedDate"]},"description":"Initial applications, each applying the credit memo to an invoice when it is created."}},"additionalProperties":false,"required":["customerId","entityId","currency","creditMemoDate","lines"]},"applyPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"applyPaymentInput":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to apply the payment to. See id on GET accounting/invoices/:id."},"amount":{"type":"string","format":"decimal","description":"The amount to apply to this invoice, in the payment currency. Must be greater than 0."},"appliedDate":{"type":"string","format":"date","description":"The date the application is recognized. Use format YYYY-MM-DD."},"earlyPaymentDiscount":{"type":"string","format":"decimal","description":"The early-payment discount granted on this application, in the payment currency."},"smallBalanceWriteOffAmount":{"type":"string","format":"decimal","description":"The small-balance write-off amount on this application, in the payment currency."}},"additionalProperties":false,"required":["invoiceId","amount","appliedDate"]},"description":"The per-invoice amounts to apply from the payment."}},"additionalProperties":false,"required":["invoices"]},"getInvoiceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice."},"invoiceNumber":{"type":"string","description":"The invoice number, for example 'INV-1', unique within the tenant. Absent while none has been assigned."},"invoiceDate":{"type":"string","format":"date","description":"The date the invoice was issued. Format YYYY-MM-DD. Payment terms and the general ledger impact are both based on this date."},"dueDate":{"type":"string","format":"date","description":"The date payment falls due, the invoice date plus the payment term. Format YYYY-MM-DD. Absent when no term has been resolved."},"lastPaidDate":{"type":"string","format":"date","description":"The date the most recent payment was applied. Format YYYY-MM-DD. Absent on an invoice that has never been paid against."},"invoiceStatus":{"type":"string","description":"The settlement status of the invoice. Possible values: 'unpaid', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'isOverdue', 'disputed'."},"approvalStatus":{"type":"string","description":"The finance approval status of the invoice. Possible values: 'draft', 'pendingApproval', 'approved', 'revise', 'rejected'."},"deliveryStatus":{"type":"string","description":"How far the invoice has got in being sent to the customer. Possible values: 'created', 'toBeSent', 'delivered', 'read', 'failed'."},"disputeStatus":{"type":"string","description":"The dispute status of the invoice, set only when payments against it are under dispute. Possible values: 'disputed', 'chargedBack'."},"dataSource":{"type":"string","description":"The system the invoice record was imported from, for invoices that arrived through an integration or migration rather than being created in this system. For example 'NetSuite', 'Quickbooks', 'Stripe' or 'MigrationFile'. Absent on invoices created in this system."},"currency":{"type":"string","description":"The currency of the invoice. Format ISO 4217, for example 'USD'. It applies to every amount on the record, on the header and on every line."},"customerMessage":{"type":"string","description":"A free-form message printed on the invoice for the customer."},"externalInvoiceId":{"type":"string","description":"The invoice's identifier in an external source system, kept for reconciliation. For identifiers owned by your other systems, prefer externalIdentifiers below."},"customerId":{"type":"string","description":"The customer the invoice is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer, as it appears on the document."},"customerNumber":{"type":"string","description":"The customer number of the customer, unique within the tenant."},"entityId":{"type":"string","description":"The legal entity issuing the invoice. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"salesOrderId":{"type":"string","description":"The sales order the invoice was billed from. Absent on invoices created directly. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"type":"string","description":"The number of the source sales order. Present whenever salesOrderId is."},"billToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address record. Absent when none is set."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The bill-to address the invoice is sent to. Absent when the invoice references no bill-to record."},"soldToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address record. Absent when none is set."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The sold-to address the product or service was delivered to, used for tax determination. Absent when the invoice references no sold-to record."},"invoiceEmail":{"type":"string","description":"The email address of the business contact that receives this invoice."},"purchaseOrders":{"type":"array","items":{"type":"string"},"description":"The purchase order references the customer supplied, derived from the sales order. These are the customer's own document numbers. An empty array when none were supplied."},"purchaseOrderOverride":{"type":"string","description":"A manually entered PO number that overrides the sales-order-derived values in purchaseOrders."},"paymentTermDays":{"type":"number","description":"The number of days after the invoice date that payment falls due, resolved from the invoice's payment term. The term record itself is not published, only its day count."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the invoice's currency to the entity's functional currency. Absent when no conversion applies."},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the invoice is left out of the tax engine. Derived from the sales order."},"subtotal":{"type":"string","format":"decimal","description":"The amount before taxes and discounts, in the invoice currency. Absent when no subtotal has been computed."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the invoice currency."},"totalDutiesAndCustoms":{"type":"string","format":"decimal","description":"The total duties and customs across all lines, in the invoice currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total invoiced, including taxes and duties, in the invoice currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount that was due when the invoice was created, in the invoice currency."},"totalCredited":{"type":"string","format":"decimal","description":"The total credited back against this invoice by credit memos, in the invoice currency."},"totalLateFeeAmount":{"type":"string","format":"decimal","description":"The total late fees charged on this invoice, in the invoice currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of discount amounts across all invoice lines, in the invoice currency."},"oneTimeDiscount":{"type":"string","format":"decimal","description":"The one-time discount applied to the invoice as a whole, in the invoice currency."},"paymentsApplied":{"type":"string","format":"decimal","description":"The amount settled by payments so far, in the invoice currency."},"adjustments":{"type":"string","format":"decimal","description":"The sum of small-balance write-offs and early-payment discounts recorded against this invoice, in the invoice currency."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the invoice record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice line."},"invoiceLineNumber":{"type":"string","description":"The sequential line number within the invoice."},"description":{"type":"string","description":"The line description, as shown to the customer."},"lineType":{"type":"string","description":"The kind of charge the line is. Possible values: 'recurring', 'oneTime', 'oneTimeDiscount', 'usageOverage', 'overage', 'payAsYouGo', 'commit', 'lateFee', 'creditCardProcessingFee', 'billableTime', 'billablePassThrough', 'billableTravelExpense'."},"productId":{"type":"string","description":"The billed product. Set only on lines created from a product reference, absent on free-text lines. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The product code as it stood when the line was created. A snapshot, so it does not follow later changes to the product."},"productDescription":{"type":"string","description":"The product description as it stood when the line was created. A snapshot, as with productCode."},"quantity":{"type":"string","format":"decimal","description":"The quantity billed. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'each', 'hour' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit actually charged, in the invoice currency."},"listPrice":{"type":"string","format":"decimal","description":"The undiscounted list price per unit, in the invoice currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax and duties, in the invoice currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount granted on the line, in the invoice currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount granted on the line as a percentage. A rate, not an amount, so it has no currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the invoice currency."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs charged on the line, in the invoice currency."},"amount":{"type":"string","format":"decimal","description":"The total billed for the line, including tax and duties, in the invoice currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount of the line still due, in the invoice currency."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the invoice, each billing one product or free-text item. An empty array when the invoice has no lines. All line amounts are in the invoice currency."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a stable camelCase slug such as 'netsuiteInvoiceId', not the human-readable label. It must match an active external-identifier configuration for invoices."},"value":{"type":"string","description":"The identifier as the source system stores it."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the originating system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by your other systems. At most one entry per fieldName. An empty array when the invoice has none."}},"additionalProperties":false,"required":["id","invoiceDate","currency","customerId","entityId","lastModifiedDate"]},"getFiscalCalendarOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fiscal calendar."},"calendarName":{"type":"string","description":"The name of the fiscal calendar, unique within the tenant."},"description":{"type":"string","description":"A description of the fiscal calendar. Absent when none has been set."},"periodFormat":{"type":"string","description":"How the fiscal calendar divides a fiscal year into periods. Possible values: 'calendarMonths' (twelve monthly periods), '4-4-5', '4-5-4', '5-4-4' (retail quarters of thirteen weeks, split into periods of that many weeks)."},"status":{"type":"string","description":"The lifecycle status of the fiscal calendar. Possible values: 'new', 'active', 'deactivated'. Absent when none has been set."},"fiscalYearsCount":{"type":"number","description":"The number of distinct fiscal years on this calendar. Absent until the first fiscal year exists."},"fiscalYears":{"type":"array","items":{"type":"string"},"description":"The distinct fiscal years this calendar spans, taken from its accounting periods, in no guaranteed order. Each is a free-text label such as 'FY2024'. An empty array when the calendar has no fiscal years yet."},"assignedEntities":{"type":"array","items":{"type":"string"},"description":"The names, not the identifiers, of the legal entities this calendar is assigned to, in no guaranteed order. An empty array when it is assigned to none."},"anchorDate":{"type":"string","format":"date","description":"The anchor reference date, set only for retail calendars (a '4-4-5', '4-5-4' or '5-4-4' periodFormat). It is the last day of the month before the first period starts. Format YYYY-MM-DD. Absent on a calendarMonths calendar."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fiscal calendar last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","calendarName","periodFormat","lastModifiedDate"]},"updateFundTransferOutput":{"type":"object","properties":{},"additionalProperties":false},"updateFundTransferInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity to post the transfer under. See id on GET base/entities."},"fromAccountId":{"type":"string","description":"The general-ledger account the money leaves. It must differ from toAccountId. See id on GET accounting/accounts/:id."},"toAccountId":{"type":"string","description":"The general-ledger account the money arrives in. It must differ from fromAccountId. See id on GET accounting/accounts/:id."},"transferDate":{"type":"string","format":"date","description":"The date the transfer takes place. Use format YYYY-MM-DD. It sets the posting period."},"transferAmount":{"type":"string","format":"decimal","description":"The amount leaving the from-account, in the transfer currency. It must be greater than zero.","examples":["2750.00"]},"currency":{"type":"string","description":"The currency of the transfer amount. Format ISO 4217, for example 'USD'. Omit to use the from-account's own currency. A value that does not match it fails with CURRENCY_MISMATCH."},"toAmount":{"type":"string","format":"decimal","description":"The amount actually received in the to-account, in that account's currency. Supply it for a cross-currency transfer. Omit to mirror the amount sent."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate applied between the two account currencies. It must be greater than zero."},"status":{"type":"string","description":"The payment status. Accepted values: 'recorded', 'inProgress', 'completed', 'voided', 'failed', 'noStatus', 'unknown'. Defaults to 'recorded'."},"name":{"type":"string","description":"A short name for the transfer, shown in listings.","examples":["February sweep — revised"]},"description":{"type":"string","description":"A free-form description of the transfer. It is copied onto both lines."},"toEntityId":{"type":"string","description":"The receiving legal entity, for a transfer between entities. Defaults to entityId. See id on GET base/entities."},"origin":{"type":"string","description":"The system or process the transfer came from."},"externalUrl":{"type":"string","description":"An absolute http or https link to the transfer in the originating system."},"externalPaymentId":{"type":"string","description":"The identifier of the payment in the source system this transfer settles."}},"additionalProperties":false},"getAccountingPeriodStatusOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this entity-book period status row. This identifies the (entity, book, period) combination, not the shared accounting period."},"accountingPeriodId":{"type":"string","description":"The identifier of the underlying accounting period, shared by every entity that uses this fiscal calendar. See id on GET accounting/accounting-periods/:id."},"entityId":{"type":"string","description":"The identifier of the legal entity this status belongs to. See id on GET base/entities. Absent only when the entity-book link is broken."},"entityName":{"type":"string","description":"The name of the legal entity this status belongs to."},"bookId":{"type":"string","description":"The identifier of the accounting book this status belongs to. A period is opened and closed per book. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this status belongs to."},"periodName":{"type":"string","description":"The display name of the period as its fiscal calendar defines it, for example 'Jan 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"fiscalYear":{"type":"string","description":"The fiscal year label this period belongs to, for example 'FY2024'. Set by the calendar, so it need not match the calendar year of startDate."},"fiscalQuarter":{"type":"string","description":"The fiscal quarter label this period belongs to, for example 'Q1 2026'."},"startDate":{"type":"string","format":"date","description":"The first day of the period, inclusive. Format YYYY-MM-DD. Absent only when the underlying period was deleted."},"endDate":{"type":"string","format":"date","description":"The last day of the period, inclusive. Format YYYY-MM-DD."},"status":{"type":"string","description":"The status this entity and book have put the period in. Possible values: 'created' (generated, not yet opened), 'open', 'closed', 'reopened'. Only 'open' and 'reopened' accept postings."},"postable":{"type":"boolean","description":"Whether the period currently accepts postings for this entity and book, true when its status is 'open' or 'reopened'. This does not account for journal-type-specific locks."},"postableReason":{"type":"string","description":"Why the period does not accept postings, for example 'status is closed'. Empty when it is postable."},"reopeningReason":{"type":"string","description":"The free-text reason recorded when the period was reopened. Set only when status is 'reopened'."},"reopenedByCascade":{"type":"boolean","description":"Whether this period was reopened as a side effect of reopening a later one, rather than directly."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this status row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It changes when the period is opened, closed or reopened for this entity and book."},"closeTasks":{"type":"array","items":{"type":"object","properties":{"taskCode":{"type":"string","description":"The code identifying the task, and the value to pass as task to POST accounting/period-status/:id/execute-task. The forward tasks, for example 'open', 'close', 'reopen', 'lockAP', 'lockAR', 'lockRevenue', 'lockJournals', 'runRevaluation', 'calculateConsolidationRates'. The task that undoes one is in reverseTaskCode."},"reverseTaskCode":{"type":"string","description":"The code of the task that undoes this one, for example 'unlockAP' for 'lockAP'. Empty when the task cannot be reversed."},"isExecuted":{"type":"boolean","description":"Whether this task has already run for this entity-book period."},"isExecutable":{"type":"boolean","description":"Whether this task can run now. It is false for a task already done and for one whose preconditions are unmet. notExecutableReason says which."},"notExecutableReason":{"type":"string","description":"Why the task cannot run now. Present only when isExecutable is false and a reason is available."},"isReversible":{"type":"boolean","description":"Whether the task that undoes this one can run now."},"notReversibleReason":{"type":"string","description":"Why the reversal cannot run now. Present only when isReversible is false and a reason is available."},"notApplicable":{"type":"boolean","description":"Whether this task does not apply to this entity-book period at all, for example a consolidation task on an entity that does not consolidate. Such a task is neither executed nor executable and does not block the close."},"message":{"type":"string","description":"A human-readable, translated description of the task's state: the applied message when it has run, the not-applied message when it has not, or the not-applicable message when it does not apply."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this task's state last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on a task that has never run."},"lastModifiedBy":{"type":"string","description":"The identifier of the user who last changed this task's state. Absent on a task that has never run."}},"additionalProperties":false,"required":["taskCode","isExecuted","isExecutable","isReversible"]},"description":"The period-close checklist for this entity and book, one entry per task. An empty array when the row has no tasks yet. Check isExecutable before running a task with POST accounting/period-status/:id/execute-task."}},"additionalProperties":false,"required":["id","status","postable","postableReason","lastModifiedDate"]},"accountsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account."},"accountNumber":{"type":"string","description":"The account number, unique within its chart of accounts."},"accountName":{"type":"string","description":"The display name of the account."},"accountType":{"type":"string","description":"The top-level classification of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'."},"accountSubType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A finer classification within accountType. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Absent when none is assigned."},"accountStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle status of the account. Possible values: 'enabled' (available on transactions), 'disabled' (not available for new transactions), 'draft' (created but not yet reviewed), 'draftErrors' (a draft with validation errors to resolve before it can be enabled)."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the account. Absent when none was set."},"chartOfAccountsId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the chart of accounts this account belongs to. An account belongs to exactly one. See id on GET accounting/chart-of-accounts/:id."},"parentAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the parent account this account rolls up to. Absent for a top-level account. See id on GET accounting/accounts/:id."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Balances from child accounts aggregate here, and journal entries cannot be posted to it directly."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the legal entity this account is denominated for. Set only on bank and credit-card accounts. See id on GET base/entities."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account's currency. Format ISO 4217, for example 'USD'. Set only on accounts linked to a cash account, alongside entityId."},"revaluation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether balances on this account are revalued for exchange-rate changes."},"revaluationMode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which revaluation results this account recognizes. Possible values: 'recognizeAll' (both unrealized gains and unrealized losses), 'recognizeAllButUnrealizedGains' (only unrealized losses, leaving gains unposted as the imparity principle requires), 'none' (the account is not revalued). Absent when the account has no mode set. `revaluation` is true for every value other than 'none'."},"payOnBehalf":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this account takes part in pay-on-behalf accounting."},"elimination":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this account is eliminated during consolidation."},"exchangeRateType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which rate translates this account's amounts on revaluation. Possible values: 'historical', 'average', 'current'. Absent on grouping accounts."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the account record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"journalEntriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the journal entry."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the journal entry."},"status":{"type":"string","description":"The posting status of the journal entry. Possible values: 'posted', 'unposted', 'voided'."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the entry originated, for example 'manual', 'invoice', 'revaluation' or 'reversal'. A system-assigned value."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status of the journal entry. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Absent on entries that never entered the approval workflow."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Format YYYY-MM-DD."},"reversalDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The reversal date recorded on the entry. Format YYYY-MM-DD. Set only on a reversed entry or a reversal entry."},"reversalReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason recorded for the reversal. Possible values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'."},"reversalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description recorded on the reversal."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the journal entry."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A link to the source document this entry comes from."},"bookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the accounting book this entry posts to. See name on GET accounting/books/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the journal entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchTaxConfigurationOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax configuration."},"entityId":{"type":"string","description":"The legal entity this configuration belongs to. An entity has at most one tax configuration. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the owning legal entity."},"status":{"type":"string","description":"The status of the tax configuration. The tax codes of an inactive configuration are not offered on documents. Possible values: 'Active', 'Inactive'."},"taxRegime":{"type":"string","description":"The tax system that determines which tax components are valid. Possible values: 'EU_VAT', 'India_GST', 'Canada_GST', 'Ghana_VAT', 'SingleRate_GST', 'Mexico_IVA'."},"externalId":{"type":"string","description":"An external system's identifier for this configuration, set when it was migrated from another system."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the tax configuration record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax code line."},"taxCode":{"type":"string","description":"The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'. Absent when none was supplied."},"title":{"type":"string","description":"The display title of the tax code. Unique within the configuration."},"comment":{"type":"string","description":"A free-form note on when to use this tax code. Absent when none was set."},"vatDeclarationField":{"type":"string","description":"The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Free text, not evaluated. Absent when none was set."},"percentage":{"type":"string","format":"decimal","description":"The tax rate, as a decimal fraction. For example, 0.19 is 19%. 0 for a zero-rated or exempt code."},"rateType":{"type":"string","description":"The legal rate classification of the tax code. Possible values: 'Standard', 'Reduced', 'SuperReduced', 'Zero', 'Exempt'."},"scope":{"type":"string","description":"The territorial scope of the transaction. Possible values: 'Domestic', 'IntraEU_B2B', 'IntraEU_B2C', 'ExtraEU_Goods', 'ExtraEU_Services'."},"direction":{"type":"string","description":"Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales. Possible values: 'Input', 'Output'."},"isReverseCharge":{"type":"boolean","description":"Whether the recipient rather than the supplier accounts for the tax, for example under §13b UStG. A reverse-charge line books a second, crediting entry to reverseChargeCreditAccountId on each of its accounts."},"cashBasis":{"type":"boolean","description":"Cash basis: the tax becomes creditable only when the bill is paid. It posts to the uncollected account and moves to the collected account on payment."},"isActive":{"type":"boolean","description":"Whether the tax code is offered for selection on new documents. Inactive codes stay readable on existing documents."},"index":{"type":"number","description":"The position of the line within its configuration, used for display order."},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account mapping."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount on a reverse-charge line. Absent when isReverseCharge is false. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["id","chartOfAccountsId","accountId"]},"description":"The general ledger accounts this tax code books to, usually one for each chart of accounts the entity books in. Every tax code has at least one, including exempt and zero-rated codes, which book a tax line at zero."},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the component."},"taxComponentCode":{"type":"string"},"percentage":{"type":"string","format":"decimal"},"isRecoverable":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chartOfAccountsId":{"type":"string"},"accountId":{"type":"string"},"reverseChargeCreditAccountId":{"type":"string"},"collectedAccountId":{"type":"string"}},"additionalProperties":false,"required":["id","chartOfAccountsId","accountId"]}}},"additionalProperties":false,"required":["id","taxComponentCode","percentage","isRecoverable","accounts"]},"description":"The tax components of this code, with their GL accounts. Empty for a code that has line-level accounts only."}},"additionalProperties":false,"required":["id","title","percentage","rateType","scope","direction","isReverseCharge","cashBasis","isActive","index","accounts","components"]},"description":"The tax codes of this configuration, in display order. Every configuration has at least one."}},"additionalProperties":false,"required":["id","entityId","status","taxRegime","lastModifiedDate","lines"]},"description":"The matching tax configurations for this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchTaxConfigurationInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the tax configuration with this identifier."},"entityId":{"type":"string","description":"Limits results to the configuration of this legal entity. An entity has at most one, so this returns at most one match. See id on GET base/entities."},"status":{"type":"string","description":"Limits results to configurations of this status. Possible values: 'Active', 'Inactive'. Any other value matches no configuration."},"taxRegime":{"type":"string","description":"Limits results to configurations of this tax regime. Possible values: 'EU_VAT', 'India_GST', 'Canada_GST', 'Ghana_VAT', 'SingleRate_GST', 'Mexico_IVA'. Any other value matches no configuration."}},"additionalProperties":false,"description":"The filters to apply. A tax configuration must match every filter you send. Omit to return all tax configurations."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of tax configurations per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"getCreditCardEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit card entry."},"creditCardEntryNumber":{"type":"string","description":"The credit card entry number. Absent until one has been assigned."},"name":{"type":"string","description":"The display name of the credit card entry."},"description":{"type":"string","description":"A free-form description of the entry."},"transactionDate":{"type":"string","format":"date","description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD. Defaults to the transaction date where the entity's country requires a service date."},"currency":{"type":"string","description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"type":"string","description":"The reconciliation status of the entry. Possible values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"type":"string","description":"A label for the source system the entry was created from."},"externalUrl":{"type":"string","description":"A link to the source document in an external system."},"creditCardAccountId":{"type":"string","description":"The credit card general-ledger account this entry is recorded against. See id on GET accounting/accounts/:id."},"creditCardAccountName":{"type":"string","description":"The name of the credit card general-ledger account."},"entityId":{"type":"string","description":"The legal entity this entry is posted under. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the credit card entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A free-form description of the line."},"lineType":{"type":"string","description":"The kind of line. Possible values: 'oneTime', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The gross line amount, including VAT, in the entry currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217. It always matches the entry currency."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the entry currency."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount on the line, in the entry currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%."},"origin":{"type":"string","description":"A label for the source system, copied onto the line from the entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. To read its schedule lines, pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted entry reads 'notStarted' until the entry posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id. Absent on a schedule that has no schedule lines yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far by the schedule lines whose journal entries are posted, in the entry currency. Zero until the first schedule line's journal entry is posted."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. To read the schedule lines, use GET accounting/amortization-schedule-lines and filter on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The posting lines of the entry, one per general-ledger posting. An empty array when the entry has none."}},"additionalProperties":false,"required":["id","transactionDate","status","lastModifiedDate"]},"getCustomerOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the customer."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"customerNumber":{"type":"string","description":"The customer number. Example: 'CUS-789012'."},"customerType":{"type":"string","description":"The customer type. Possible values: 'default' (a direct customer), 'partner' (a reseller or third-party payer that is invoiced for its end customers), 'endCustomer' (a customer that buys through a partner)."},"partnerType":{"type":"string","description":"The partner type of a customer whose customerType is 'partner'. Possible values: 'reseller', 'thirdPartyPayer'."},"businessType":{"type":"string","description":"The business type of the customer. Possible values: 'company', 'individual'."},"entityId":{"type":"string","description":"The legal entity that invoices this customer."},"entityName":{"type":"string","description":"The name of the legal entity that invoices this customer."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the customer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to."},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax."},"defaultCurrency":{"type":"string","description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code."},"segment":{"type":"string","description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'. Absent when businessType is 'individual'."},"paymentTermLabel":{"type":"string","description":"The display name of the payment term applied to the customer's invoices. See label on GET accounting/payment-terms."},"exemptionNumber":{"type":"string","description":"The tax-exemption certificate number. Absent when taxExempt is false."},"addresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Possible values: 'billTo', 'soldTo'."},"isDefault":{"type":"boolean","description":"Whether this is the customer's default address of its type."},"addressId":{"type":"string","description":"The unique identifier for the address."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","isDefault"]},"description":"The customer's addresses, bill-to entries first, then sold-to. Each entry names its type and whether it is that type's default. An empty array when the customer has no address."},"taxExemptCode":{"type":"string","description":"The tax-exemption reason code."},"salesChannel":{"type":"string","description":"The sales channel for this customer. Possible values: 'salesAssisted' (sold through a salesperson), 'selfServe'."},"additionalContactEmail":{"type":"string","description":"Another email address for the customer, besides invoiceEmail and mainEmail."},"mainContactName":{"type":"string","description":"The name of the customer's main contact."},"preferredLanguage":{"type":"string","description":"The customer's preferred language. Possible values: 'english'."},"crmCustomerId":{"type":"string","description":"The customer's identifier in an external CRM system."},"businessIdentificationNumber":{"type":"string","description":"The customer's business registration number."},"invoiceConsolidation":{"type":"string","description":"How the customer's invoices are consolidated. Possible values: 'customer', 'purchaseOrderNumber', 'salesArrangement'."},"invoiceDeliveryMode":{"type":"string","description":"How invoices are delivered to the customer. Possible values: 'manual', 'automated'."},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether the customer is exempt from credit-card fees."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel and expense items appear on invoices. Possible values: 'detailed', 'consolidated'."},"status":{"type":"string","description":"The status of the customer. Possible values: 'active', 'inactive'."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to the customer's invoices. See code on GET accounting/payment-terms. `paymentTermLabel` is its display name."},"taxRegistrations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"The country the registration applies in, as an ISO 3166-1 code."},"taxNumber":{"type":"string","description":"The tax identification number issued by the tax authority."},"type":{"type":"string","description":"The kind of tax registration. Possible values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'."},"effectiveDate":{"type":"string","description":"The date the registration takes effect. Format YYYY-MM-DD."},"isActive":{"type":"boolean","description":"Whether the registration is active. Only one active registration is allowed per country and tax type."},"note":{"type":"string","description":"An internal note on the registration."},"validationStatus":{"type":"string","description":"The validation state the tax engine assigned."},"validationMessages":{"type":"string","description":"Detail behind the validation state, when the tax engine recorded any."}},"additionalProperties":false,"required":["country","taxNumber","type"]},"description":"The customer's tax registrations. An empty array when the customer has none."},"payment":{"type":"object","properties":{"provider":{"type":"string","description":"The name of the payment provider. Example: 'Stripe'."},"externalCustomerId":{"type":"string","description":"The customer's identifier in the payment provider's system."},"externalPaymentMethodId":{"type":"string","description":"The customer's default payment method in the payment provider's system."}},"additionalProperties":false,"description":"The customer's link to a payment provider. Absent when no provider is linked."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The customer's identifiers in other systems, one per configured field name. An empty array when the customer has none."}},"additionalProperties":false,"required":["id","name","customerNumber","entityId","lastModifiedDate"]},"createRefundOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created refund.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'. Assigned on create.","examples":["REF-1042"]},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD.","examples":["2026-08-01"]},"approvalStatus":{"type":"string","description":"The approval status, always 'approved' immediately after create.","examples":["approved"]},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'.","examples":["ach"]},"currency":{"type":"string","description":"The currency of the refund, derived from the source payment. Every amount on it is in this currency. Format ISO 4217, for example 'USD'.","examples":["USD"]},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency.","examples":["150.00"]},"customerId":{"type":"string","description":"The customer receiving the refund, derived from the source payment. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"entityId":{"type":"string","description":"The legal entity issuing the refund, derived from the source payment. See id on GET base/entities.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T09:12:44.000Z"]}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"createRefundInput":{"type":"object","properties":{"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"refundDate":{"type":"string","format":"date","description":"The date the refund is issued. Use format YYYY-MM-DD. Must fall in an open accounting period.","examples":["2026-08-01"]},"refundType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The payment method used for the refund.","examples":["ach"]},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the source payment's currency. Must be greater than 0.","examples":["150.00"]},"refundNote":{"type":"string","description":"A free-form note attached to the refund.","examples":["Customer requested partial refund"]},"unapply":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to unapply the payment from. See id on GET accounting/invoices/:id."},"amount":{"type":"string","format":"decimal","description":"The amount to unapply from this invoice, in the payment currency."}},"additionalProperties":false,"required":["invoiceId","amount"]},"description":"Invoices to unapply the source payment from before the refund is created, freeing balance for the refund. The amount unapplied from each invoice is recognized on refundDate."}},"additionalProperties":false,"required":["paymentId","refundDate","refundType","amount"]},"getRefundOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the refund.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'. Assigned on create.","examples":["REF-1042"]},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD.","examples":["2026-08-01"]},"approvalStatus":{"type":"string","description":"The approval status. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. A refund created through POST accounting/refunds is approved immediately.","examples":["approved"]},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'.","examples":["ach"]},"currency":{"type":"string","description":"The currency of the refund. Every amount on it is in this currency. Format ISO 4217, for example 'USD'.","examples":["USD"]},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency.","examples":["150.00"]},"unappliedAmount":{"type":"string","format":"decimal","description":"The unapplied balance remaining on the source payment, in the refund currency.","examples":["0.00"]},"refundNote":{"type":"string","description":"A free-form note attached to the refund. Absent when none was set."},"customerId":{"type":"string","description":"The customer receiving the refund. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"customerName":{"type":"string","description":"The name of the customer receiving the refund.","examples":["Northwind Traders"]},"entityId":{"type":"string","description":"The legal entity issuing the refund. See id on GET base/entities.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"paymentNumber":{"type":"string","description":"The number of the source payment being refunded.","examples":["PMT-7781"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T09:12:44.000Z"]}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"getChartOfAccountsOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the chart of accounts."},"name":{"type":"string","description":"The display name of the chart of accounts."},"accountNumbering":{"type":"string","description":"How account numbers are assigned within this chart of accounts. Possible values: 'hierarchical' (numbers follow the account's position in the hierarchy), 'manual' (numbers are assigned by hand)."},"accountNumberingDigits":{"type":"string","description":"The total width of an account number, which caps how deep the hierarchy can go. Possible values: 'sixDigits' (up to 4 levels), 'sevenDigits' (5), 'eightDigits' (6), 'nineDigits' (7), 'tenDigits' (8). Absent when no width was set. A width and the numbering strategy are independent, so check this field directly rather than inferring it from accountNumbering."},"description":{"type":"string","description":"A free-form description of the chart of accounts. Absent when none was set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the chart-of-accounts record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","accountNumbering","lastModifiedDate"]},"searchPriceBookOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book."},"priceBookName":{"type":"string","description":"The display name of the price book, unique within the tenant and compared case-insensitively."},"priceBookNumber":{"type":"string","description":"The price book number, for example 'PB-000123'. Absent until a number range assigns one."},"description":{"type":"string","description":"A free-form description of the price book. Absent when none is set."},"active":{"type":"boolean","description":"Whether the price book is active and usable in transactions."},"isStandard":{"type":"boolean","description":"Whether this is the standard (default) price book. Only one price book is the standard at a time. It cannot be set through this API."},"dataSource":{"type":"string","description":"The source system that provided the price book data. Absent when none is set."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the price book was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the price book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","priceBookName","lastModifiedDate"]},"description":"The price books that match, ordered by id. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPriceBookInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the price book with this identifier. The match is exact."},"priceBookNumber":{"type":"string","description":"Limits results to the price book with this price book number, for example 'PB-000123'. The match is exact."},"priceBookName":{"type":"string","description":"Limits results to price books whose name contains this text. The match is case-insensitive."},"isStandard":{"type":"boolean","description":"Limits results to the standard price book when true, or to non-standard price books when false."},"active":{"type":"boolean","description":"Limits results to active price books when true, or inactive ones when false."},"dataSource":{"type":"string","description":"Limits results to price books whose data source is this value."},"createdDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The inclusive start of the range, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","format":"date-time","description":"The inclusive end of the range, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to price books created within this date range. Both bounds are inclusive, and omitting one leaves that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The inclusive start of the range, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","format":"date-time","description":"The inclusive end of the range, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to price books last changed within this date range. Both bounds are inclusive, and omitting one leaves that side open."}},"additionalProperties":false,"description":"The filters to apply. A price book must match every filter you send. Omit to return all price books."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of price books per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"searchInvoiceOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice."},"invoiceNumber":{"type":"string","description":"The invoice number, for example 'INV-1', unique within the tenant. Absent while none has been assigned."},"invoiceDate":{"type":"string","format":"date","description":"The date the invoice was issued. Format YYYY-MM-DD. Payment terms and the general ledger impact are both based on this date."},"dueDate":{"type":"string","format":"date","description":"The date payment falls due, the invoice date plus the payment term. Format YYYY-MM-DD. Absent when no term has been resolved."},"lastPaidDate":{"type":"string","format":"date","description":"The date the most recent payment was applied. Format YYYY-MM-DD. Absent on an invoice that has never been paid against."},"invoiceStatus":{"type":"string","description":"The settlement status of the invoice. Possible values: 'unpaid', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'isOverdue', 'disputed'."},"approvalStatus":{"type":"string","description":"The finance approval status of the invoice. Possible values: 'draft', 'pendingApproval', 'approved', 'revise', 'rejected'."},"deliveryStatus":{"type":"string","description":"How far the invoice has got in being sent to the customer. Possible values: 'created', 'toBeSent', 'delivered', 'read', 'failed'."},"disputeStatus":{"type":"string","description":"The dispute status of the invoice, set only when payments against it are under dispute. Possible values: 'disputed', 'chargedBack'."},"dataSource":{"type":"string","description":"The system the invoice record was imported from, for invoices that arrived through an integration or migration rather than being created in this system. For example 'NetSuite', 'Quickbooks', 'Stripe' or 'MigrationFile'. Absent on invoices created in this system."},"currency":{"type":"string","description":"The currency of the invoice. Format ISO 4217, for example 'USD'. It applies to every amount on the record, on the header and on every line."},"customerMessage":{"type":"string","description":"A free-form message printed on the invoice for the customer."},"externalInvoiceId":{"type":"string","description":"The invoice's identifier in an external source system, kept for reconciliation. For identifiers owned by your other systems, prefer externalIdentifiers below."},"customerId":{"type":"string","description":"The customer the invoice is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer, as it appears on the document."},"customerNumber":{"type":"string","description":"The customer number of the customer, unique within the tenant."},"entityId":{"type":"string","description":"The legal entity issuing the invoice. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"salesOrderId":{"type":"string","description":"The sales order the invoice was billed from. Absent on invoices created directly. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"type":"string","description":"The number of the source sales order. Present whenever salesOrderId is."},"billToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address record. Absent when none is set."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The bill-to address the invoice is sent to. Absent when the invoice references no bill-to record."},"soldToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address record. Absent when none is set."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The sold-to address the product or service was delivered to, used for tax determination. Absent when the invoice references no sold-to record."},"invoiceEmail":{"type":"string","description":"The email address of the business contact that receives this invoice."},"purchaseOrders":{"type":"array","items":{"type":"string"},"description":"The purchase order references the customer supplied, derived from the sales order. These are the customer's own document numbers. An empty array when none were supplied."},"purchaseOrderOverride":{"type":"string","description":"A manually entered PO number that overrides the sales-order-derived values in purchaseOrders."},"paymentTermDays":{"type":"number","description":"The number of days after the invoice date that payment falls due, resolved from the invoice's payment term. The term record itself is not published, only its day count."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the invoice's currency to the entity's functional currency. Absent when no conversion applies."},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the invoice is left out of the tax engine. Derived from the sales order."},"subtotal":{"type":"string","format":"decimal","description":"The amount before taxes and discounts, in the invoice currency. Absent when no subtotal has been computed."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the invoice currency."},"totalDutiesAndCustoms":{"type":"string","format":"decimal","description":"The total duties and customs across all lines, in the invoice currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total invoiced, including taxes and duties, in the invoice currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount that was due when the invoice was created, in the invoice currency."},"totalCredited":{"type":"string","format":"decimal","description":"The total credited back against this invoice by credit memos, in the invoice currency."},"totalLateFeeAmount":{"type":"string","format":"decimal","description":"The total late fees charged on this invoice, in the invoice currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of discount amounts across all invoice lines, in the invoice currency."},"oneTimeDiscount":{"type":"string","format":"decimal","description":"The one-time discount applied to the invoice as a whole, in the invoice currency."},"paymentsApplied":{"type":"string","format":"decimal","description":"The amount settled by payments so far, in the invoice currency."},"adjustments":{"type":"string","format":"decimal","description":"The sum of small-balance write-offs and early-payment discounts recorded against this invoice, in the invoice currency."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the invoice record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice line."},"invoiceLineNumber":{"type":"string","description":"The sequential line number within the invoice."},"description":{"type":"string","description":"The line description, as shown to the customer."},"lineType":{"type":"string","description":"The kind of charge the line is. Possible values: 'recurring', 'oneTime', 'oneTimeDiscount', 'usageOverage', 'overage', 'payAsYouGo', 'commit', 'lateFee', 'creditCardProcessingFee', 'billableTime', 'billablePassThrough', 'billableTravelExpense'."},"productId":{"type":"string","description":"The billed product. Set only on lines created from a product reference, absent on free-text lines. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The product code as it stood when the line was created. A snapshot, so it does not follow later changes to the product."},"productDescription":{"type":"string","description":"The product description as it stood when the line was created. A snapshot, as with productCode."},"quantity":{"type":"string","format":"decimal","description":"The quantity billed. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'each', 'hour' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit actually charged, in the invoice currency."},"listPrice":{"type":"string","format":"decimal","description":"The undiscounted list price per unit, in the invoice currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax and duties, in the invoice currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount granted on the line, in the invoice currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount granted on the line as a percentage. A rate, not an amount, so it has no currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the invoice currency."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs charged on the line, in the invoice currency."},"amount":{"type":"string","format":"decimal","description":"The total billed for the line, including tax and duties, in the invoice currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount of the line still due, in the invoice currency."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the invoice, each billing one product or free-text item. An empty array when the invoice has no lines. All line amounts are in the invoice currency."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a stable camelCase slug such as 'netsuiteInvoiceId', not the human-readable label. It must match an active external-identifier configuration for invoices."},"value":{"type":"string","description":"The identifier as the source system stores it."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the originating system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by your other systems. At most one entry per fieldName. An empty array when the invoice has none."}},"additionalProperties":false,"required":["id","invoiceDate","currency","customerId","entityId","lastModifiedDate"]},"description":"The invoices on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchInvoiceInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the invoice with this id."},"invoiceNumber":{"type":"string","description":"Limits results to the invoice with this invoice number, for example 'INV-1'. The match is exact."},"customerId":{"type":"string","description":"Limits results to invoices issued to this customer, given as the customer id. An id that matches no customer matches no invoice."},"customerName":{"type":"string","description":"Limits results to invoices whose customer name contains this text. The match is case-insensitive."},"customerNumber":{"type":"string","description":"Limits results to invoices issued to the customer with this customer number. The match is exact."},"entityId":{"type":"string","description":"Limits results to invoices issued by this legal entity, given as the entity id. An id that matches no entity matches no invoice."},"entityName":{"type":"string","description":"Limits results to invoices whose issuing legal entity's name contains this text. The match is case-insensitive."},"salesOrderId":{"type":"string","description":"Limits results to invoices billed from this sales order, given as the sales order id. An id that matches no sales order matches no invoice."},"salesOrderNumber":{"type":"string","description":"Limits results to invoices billed from the sales order with this number. The match is exact."},"invoiceStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to invoices in any of these settlement statuses. Accepted values: 'unpaid', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'isOverdue', 'disputed'. Any other value matches no invoice. An empty array does not constrain."},"approvalStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to invoices in any of these approval statuses. Accepted values: 'draft', 'pendingApproval', 'approved', 'revise', 'rejected'. Any other value matches no invoice. An empty array does not constrain."},"deliveryStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to invoices in any of these delivery statuses. Accepted values: 'created', 'toBeSent', 'delivered', 'read', 'failed'. Any other value matches no invoice. An empty array does not constrain."},"disputeStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to invoices in any of these dispute statuses. Accepted values: 'disputed', 'chargedBack'. Any other value matches no invoice. An empty array does not constrain."},"customerMessage":{"type":"string","description":"Limits results to invoices whose customer message contains this text. The match is case-insensitive."},"billToAddress":{"type":"string","description":"Limits results to invoices whose bill-to address contains this text across line1, line2, city, stateProvince and zipCode. The match is case-insensitive. Country is excluded, because it is an ISO code and a short term would match every address in the country."},"soldToAddress":{"type":"string","description":"Limits results to invoices whose sold-to address contains this text across line1, line2, city, stateProvince and zipCode. The match is case-insensitive. Country is excluded, as with billToAddress."},"invoiceEmail":{"type":"string","description":"Limits results to invoices with this billing email. The match is exact and case-sensitive."},"purchaseOrderOverride":{"type":"string","description":"Limits results to invoices with this PO override. The match is exact."},"externalInvoiceId":{"type":"string","description":"Limits results to invoices with this identifier in an external source system. The match is exact."},"invoiceDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to invoices whose invoiceDate falls within these bounds. Omit either bound to leave that side open."},"dueDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to invoices whose dueDate falls within these bounds. Omit either bound to leave that side open. An aging report is this filter with an open lower bound."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to invoices changed within this window, for polling an incremental sync. Omit either bound to leave that side open."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a stable camelCase slug such as 'netsuiteInvoiceId', not the human-readable label. It must match an active external-identifier configuration for invoices, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system stores it. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Matches one identifier owned by another system. Both members are required, because a fieldName on its own would match every value stored under that key. Several invoices may share one value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. An invoice must match every filter you send. Omit to return all invoices."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of invoices per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"commitShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentStatus":{"type":"string","description":"The status the shipment is now in, read back from the document. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DELIVERED"]},"journalEntryId":{"type":"string","description":"The unique identifier for the journal entry this step posted, when it posted one. See id on GET accounting/journal-entries/:id.","examples":["6b2d90f1-4c37-4e85-a019-8d3f5c72b6e4"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the step. An empty array on a clean run. The step succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitShipmentInput":{"type":"object","properties":{"cogsChoice":{"enum":["NON_AMORTIZED","AMORTIZED"],"description":"Whether the cost of sale is amortized. AMORTIZED requests COGS amortization schedules, which are created only for service lines, so on a shipment of goods it changes nothing. Defaults to NON_AMORTIZED."}},"additionalProperties":false},"searchReceiptsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt."},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created."},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity the receipt belongs to."},"entityName":{"type":"string","description":"The name of that legal entity."},"businessPartnerId":{"type":"string","description":"The vendor the goods came from."},"businessPartnerName":{"type":"string","description":"The name of that vendor."},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency."},"notes":{"type":"string","description":"Free text on the receipt."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The receipts on this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"COMMITTED","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T10:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more receipts remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchReceiptsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the receipt with this receipt number. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to receipts with this status. The match is exact. This api's own routes produce 'DRAFT' and 'COMMITTED'; 'RECEIVED', 'DELIVERED', 'PARTIALLY_INVOICED', 'INVOICED' and 'CANCELLED' are written by the receiving and invoicing processes around it."},"entityId":{"type":"string","description":"Limits results to receipts for this legal entity."},"businessPartnerId":{"type":"string","description":"Limits results to receipts from this vendor."},"locationId":{"type":"string","description":"Limits results to receipts that have a line for this warehouse."},"itemId":{"type":"string","description":"Limits results to receipts that have a line for this item."},"referenceNumber":{"type":"string","description":"The vendor's own reference, matched exactly — their delivery note number is what a buyer has in front of them."},"trackingNumber":{"type":"string","description":"The carrier's tracking number, matched exactly and case-sensitively."},"fromDate":{"type":"string","format":"date","description":"Inclusive lower bound on documentDate (YYYY-MM-DD)."},"toDate":{"type":"string","format":"date","description":"Limits results to receipts dated on or before this date. Format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to receipts changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A receipt must match every filter you send. Send an empty object to return all receipts.","examples":[{"documentStatus":"DRAFT"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of receipts per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"bulkCreateTransferOrdersOutput":{"type":"object","properties":{"transferOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order."},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'."},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open."},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order."},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The created transfer orders, in input order. Headers only. Read one in full on GET inventory/warehouse-transfer-orders/:id.","examples":[[{"id":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6","documentNumber":"WTO-1044","documentStatus":"DRAFT","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T10:02:41.883Z"}]]}},"additionalProperties":false,"required":["transferOrders"]},"bulkCreateTransferOrdersInput":{"type":"object","properties":{"transferOrders":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity. Defaults to the entity that owns the first line’s warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer order. Defaults to today. Use format YYYY-MM-DD."},"locationId":{"type":"string","description":"The warehouse the goods leave, for the transfer order as a whole. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to, for the transfer order as a whole. See id on GET inventory/warehouses/:id."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"notes":{"type":"string","description":"Free text on the document."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse to draw from, required on a line. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse to deliver to. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line’s unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["itemId","locationId","targetLocationId","quantity"]},"description":"The lines of the transfer order. At least one is required."}},"additionalProperties":false,"required":["lines"]},"description":"The transfer orders to create. All or nothing: if any is rejected, none is created.","examples":[[{"targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"12","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}],"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}]]}},"additionalProperties":false,"required":["transferOrders"]},"searchInventoryDecreasesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease."},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse location."},"locationName":{"type":"string","description":"The display name of that warehouse location."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The short code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'."},"notes":{"type":"string","description":"Free text on the inventory decrease."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"description":"The inventory decreases that match, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryDecreasesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the inventory decrease with this document number, for example 'DEC-42'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to inventory decreases with this status. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'. The match is exact."},"entityId":{"type":"string","description":"Limits results to inventory decreases for this legal entity. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to inventory decreases at this warehouse location. See id on GET inventory/warehouses/:id."},"reasonCodeId":{"type":"string","description":"Limits results to inventory decreases with this reason code. See id on GET inventory/reason-codes/:id."},"itemId":{"type":"string","description":"Limits results to inventory decreases that have a line for this item. The collection cannot filter by item, because lines are not on it. See id on GET inventory/items/:id."},"fromDate":{"type":"string","format":"date","description":"Limits results to documentDate on or after this date. Omit for an open-ended start. Use format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to documentDate on or before this date. Omit for an open-ended end. Use format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to inventory decreases changed at or after this time, in UTC. This is separate from the documentDate window. Use format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The search criteria, combined with AND. An empty object returns every inventory decrease, page by page.","examples":[{"documentStatus":"DRAFT","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of inventory decreases per page. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"inventoryRevaluationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The revaluation's document number, for example 'REV-1187'.","examples":["REV-1187"]},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["COMMITTED"]},"documentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the revaluation is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"costingValuationType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.","examples":["revaluation"]},"capitalisationExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit."},"reasonCodeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that reason code."},"reasonCodeDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description of that reason code."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalRevaluationAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet.","examples":["-450"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the document is active.","examples":[true]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the revaluation."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How many lines the revaluation has.","examples":[1]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.104Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"deleteItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Unique within the tenant. It is set when the item is created and cannot be changed.","examples":["WIDGET-01"]}},"additionalProperties":false,"required":["id"]},"getTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"]},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'.","examples":["WTO-1043"]},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"locationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"targetLocationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order.","examples":[1]},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. updateLines and deleteLines address a line by it."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from. See id on GET inventory/warehouses/:id. Absent while no source warehouse has been resolved, and such a line blocks the conversion."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Always greater than zero."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line is still to be transferred."},"processedQuantity":{"type":"string","format":"decimal","description":"How much of the line a transfer has already taken."},"status":{"type":"string","description":"The state of the line. 'NEEDS_SOURCE' means no source warehouse has been resolved, and the transfer order cannot be converted until it is."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer order. Absent from the collection GET inventory/warehouse-transfer-orders, which returns lineCount instead.","examples":[[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","unitCode":"EA","quantity":"40","inventoryQuantity":"40","openQuantity":"40","status":"DRAFT"}]]}},"additionalProperties":false,"required":["id","documentStatus","lines"]},"bulkCreateItemsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created item."},"itemCode":{"type":"string","description":"The item code of the created item."}},"additionalProperties":false,"required":["id"]},"description":"The created items, in the same order as the input.","examples":[[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateItemsInput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Must be unique within the tenant, including against retired items whose codes are never released. It cannot be changed after the item is created."},"itemName":{"type":"string","description":"The display name of the item."},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It cannot be changed after the item is created. See id on GET inventory/item-types/:id."},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id."},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction will be in this unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. inventoryUnitId, salesUnitId and purchaseUnitId must all be units in this group, and a unit outside it fails with UNIT_NOT_IN_UNIT_GROUP. See id on GET inventory/unit-of-measure-groups/:id."},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Accepted values: 'movingAverage', 'batch', 'serials', 'none'. Use 'none' for an item that is not stocked. Defaults to 'movingAverage'. 'batch' requires isBatch, 'serials' requires isSerial, and 'none' requires isInventory false, and each contradiction fails with TRACKING_MISMATCH. 'fifo' is under development and fails with VALUATION_METHOD_UNAVAILABLE."},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Defaults to false."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Defaults to false."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. Defaults to true. Set false for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents. Defaults to true."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents. Defaults to true."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. Defaults to true. Setting it false retires the item without deleting it."},"notes":{"type":"string","description":"Free text on the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Omit for no restriction. Omitting it is not the same as sending 1."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning. State its currency in currency."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price. State its currency in currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Required when either is given. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. Set it if the item may be received under a landed cost that uses Weight allocation, because that mode fails rather than falling back when an item has no weight."},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Accepted values: 'G', 'Kg', 'Lbs'."},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Accepted values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge billed as this item falls back to when it names none. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest storage temperature, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest storage temperature, in degrees Celsius."}},"additionalProperties":false,"required":["itemCode","itemTypeId","categoryId","inventoryUnitId","unitGroupId"]},"description":"The items to create. All or nothing: if any row is invalid, the whole call fails and nothing is created.","examples":[[{"itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87"}]]}},"additionalProperties":false,"required":["items"]},"deleteBinOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the removed bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]},"binCode":{"type":"string","description":"The bin's code.","examples":["A-01-1"]}},"additionalProperties":false,"required":["id"]},"bulkDeleteUnitOfMeasuresOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted unit of measure."},"unitCode":{"type":"string","description":"The short code the deleted unit of measure held."}},"additionalProperties":false,"required":["id","unitCode"]},"description":"The deleted units of measure, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteUnitOfMeasuresInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the units of measure to delete. If any identifier matches nothing or its unit is still in use, nothing is deleted and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeleteShipmentCarriersOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted shipment carrier."},"name":{"type":"string","description":"The name the deleted carrier held."}},"additionalProperties":false,"required":["id","name"]},"description":"The deleted shipment carriers, in the same order as the input."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteShipmentCarriersInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the shipment carriers to delete. If any id is unknown or its carrier is still named on a shipment, the whole call is rejected and nothing is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"deleteInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]}},"additionalProperties":false,"required":["id"]},"getInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'.","examples":["REV-1187"]},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.","examples":["revaluation"]},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit.","examples":["f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet.","examples":["-450"]},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation."},"lineCount":{"type":"number","description":"How many lines the revaluation has.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation line. Pass it in updateLines or deleteLines on PATCH inventory/inventory-revaluations/:id to change or remove the line."},"itemId":{"type":"string","description":"The unique identifier for the item being revalued. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock this line restates. The same item may be carried at a different cost in each warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates the cost of, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the revaluation's currency. You supply it and the platform checks it rather than deriving it. Read it from GET inventory/inventory-levels."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the revaluation's currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document, in the revaluation's currency. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize, in the revaluation's currency. Moving-average direct cost capitalization only."},"revaluationAmount":{"type":"string","format":"decimal","description":"The value this line moves on the balance sheet, in the revaluation's currency: (newUnitCost - currentUnitCost) x quantity."},"status":{"type":"string","description":"Where the line sits in the platform's own process. This is free text with no fixed set of values."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number."},"batchNumber":{"type":"string","description":"The batch number itself."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number."},"serialNumber":{"type":"string","description":"The serial number itself."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document. Direct cost capitalization on a sold serial only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit, so there must be exactly as many as the quantity says."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the revaluation. Absent from the collection endpoint, which publishes lineCount instead.","examples":[[{"id":"6c2f9a41-7b58-4d30-91e6-4a0d8c25f3b7","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationCode":"WH-CENTRAL","unitCode":"EA","quantity":"150","currentUnitCost":"12","newUnitCost":"9","revaluationAmount":"-450"}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"bulkDeleteWarehouseTransfersOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The ids of the deleted transfers, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteWarehouseTransfersInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The ids of the transfers to delete. All or nothing: if any is missing or not a draft, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"createReasonCodeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created reason code.","examples":["7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"]}},"additionalProperties":false,"required":["id"]},"createReasonCodeInput":{"type":"object","properties":{"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. Required. It must be unique within the tenant.","examples":["DAMAGE"]},"description":{"type":"string","description":"A free-form description of what the reason code means. Omit for none.","examples":["Stock damaged in the warehouse"]},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. Defaults to true. Set it to false to stage a reason code before it goes into use."},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect. Defaults to false.","examples":[true]},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The document types this reason code may be selected on. Required, but may be empty. An empty array creates a reason code that is not yet selectable anywhere. An unrecognized value fails the call with UNKNOWN_DOCUMENT_TYPES, which names every value it did not recognize. Repeated values are collapsed.","examples":[["InventoryDecrease","SalesReturn"]]}},"additionalProperties":false,"required":["code","documentTypes"]},"inventoryIncreasesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned.","examples":["INC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse the stock is added to. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code of that warehouse.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that warehouse.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the reason code. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description of that reason code.","examples":["Count correction"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the inventory increase is valued in. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines the inventory increase has. The collection does not return the lines themselves.","examples":[1]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the inventory increase.","examples":["August cycle count"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]}},"additionalProperties":false},"updateItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]}},"additionalProperties":false,"required":["id"]},"updateItemInput":{"type":"object","properties":{"itemName":{"type":"string","description":"The display name of the item."},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id."},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction will be in this unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. Moving the item to another group re-checks the units it keeps as well as any sent here, because their conversions live in the group, and a unit with no conversion fails with UNIT_NOT_IN_UNIT_GROUP. See id on GET inventory/unit-of-measure-groups/:id."},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Accepted values: 'movingAverage', 'batch', 'serials', 'none'. Use 'none' for an item that is not stocked. 'batch' requires isBatch, 'serials' requires isSerial, and 'none' requires isInventory false, and each contradiction fails with TRACKING_MISMATCH. Changing it is checked against the tracking flags the item already has, not only the ones in this request. 'fifo' is under development and fails with VALUATION_METHOD_UNAVAILABLE."},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. Set false for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. Setting it false retires the item without deleting it."},"notes":{"type":"string","description":"Free text on the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Omit for no restriction. Omitting it is not the same as sending 1."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning. State its currency in currency."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price. State its currency in currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Required when either is given. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. Set it if the item may be received under a landed cost that uses Weight allocation, because that mode fails rather than falling back when an item has no weight.","examples":["1.6"]},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Accepted values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Accepted values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge billed as this item falls back to when it names none. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest storage temperature, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest storage temperature, in degrees Celsius."}},"additionalProperties":false},"searchSerialTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial transaction. Format: UUID."},"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit this transaction is for. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity. Example: 'SN-000412'."},"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number. It shows the unit's current value, not the value at the time of the serial transaction."},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. It shows the unit's current value, not the value at the time of the serial transaction. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. It is the unit's current `entryDate`, not the date at the time of this serial transaction."},"isSold":{"type":"boolean","description":"Whether the unit has been sold. It shows the unit's current value, not the value at the time of the serial transaction. A unit that was sold and then returned has the value false."},"transactionId":{"type":"string","description":"The unique identifier of the inventory transaction this serial transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction)."},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"transactionDate":{"type":"string","format":"date","description":"The date of the inventory transaction this serial transaction belongs to. Format: YYYY-MM-DD."},"inQuantity":{"type":"string","format":"decimal","description":"The quantity of the unit that came into stock. It is 1 when the unit came in, and 0 when only the unit's cost changed. Absent when the unit went out."},"outQuantity":{"type":"string","format":"decimal","description":"The quantity of the unit that went out of stock. It is 1 when the unit went out. Absent when the unit came in or only its cost changed."},"cost":{"type":"string","format":"decimal","description":"The cost of the unit, in the currency named by `currency`. When the unit comes in, it is the cost the unit was received at. When the unit goes out, it is the unit's cost at that time. On an inventory revaluation, it is the unit's new cost."},"currency":{"type":"string","description":"The currency that `cost` is in. Format: ISO 4217, for example 'USD'."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the serial transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the unit itself, such as its `isSold` or `entryDate`, do not update this field."}},"additionalProperties":false,"required":["id","serialNumberId"]},"description":"The matching serial transactions in this response. When more serial transactions match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"8d17b4e2-3c95-4a60-b7f8-01e5d9c26a43","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-11","outQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-11T09:02:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchSerialTransactionsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"Limits results to serial transactions for the serialized unit with this unique identifier. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"Limits results to serial transactions for units with this serial number. The match is exact. Example: 'SN-000412'."},"manufacturerSerialNumber":{"type":"string","description":"Limits results to serial transactions for units with this manufacturer's serial number. The match is exact."},"isSold":{"type":"boolean","description":"Limits results to serial transactions for units that have been sold when true, and for units that have not been sold when false. It uses the unit's current value, not the value at the time of the serial transaction. A unit that was sold and then returned counts as not sold."},"itemId":{"type":"string","description":"Limits results to serial transactions for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to serial transactions for the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"fromDate":{"type":"string","format":"date","description":"Limits results to serial transactions with a `transactionDate` on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to serial transactions with a `transactionDate` on or before this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to serial transactions whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A serial transaction must match every filter you send. Send an empty object to return all serial transactions.","examples":[{"serialNumber":"SN-000412"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of serial transactions per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size."}},"additionalProperties":false,"required":["filters"]},"deleteInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]}},"additionalProperties":false,"required":["id"]},"commitTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"]},"documentStatus":{"type":"string","description":"The status of the transfer order, read back from the document. 'IN_TRANSFER' on success: the transfer this created has the open quantity and has yet to commit.","examples":["IN_TRANSFER"]},"transferId":{"type":"string","description":"The warehouse transfer this created. See id on GET inventory/warehouse-transfers/:id. It is a draft and moves nothing until it is committed in its own right.","examples":["5b2e9d14-8a37-4c06-91f5-2d7b3e08a6c9"]},"transferDocumentNumber":{"type":"string","description":"The number of that transfer.","examples":["WT-2287"]}},"additionalProperties":false,"required":["id","documentStatus"]},"commitTransferOrderInput":{"type":"object","properties":{},"additionalProperties":false},"bulkCreateShipmentCarriersOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created shipment carrier."}},"additionalProperties":false,"required":["id"]},"description":"The created shipment carriers, in the same order as the input.","examples":[[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"},{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateShipmentCarriersInput":{"type":"object","properties":{"shipmentCarriers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. It is not checked for uniqueness, within the batch or against existing carriers."},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments. Defaults to true."},"vendorId":{"type":"string","description":"The unique identifier for the vendor this carrier bills through. Omit for a carrier with no vendor. An identifier matching no vendor fails the whole call with VENDOR_NOT_FOUND naming this row's index. See id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["name"]},"description":"The shipment carriers to create. If any row is invalid, the whole call is rejected and nothing is created.","examples":[[{"name":"DHL Express","vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47"},{"name":"In-house fleet","active":false}]]}},"additionalProperties":false,"required":["shipmentCarriers"]},"bulkCreateShipmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment."},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"businessPartnerName":{"type":"string","description":"The display name of that customer."},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id."},"shipmentCarrierName":{"type":"string","description":"The name of that carrier."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods."},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment."},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it."},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency."},"notes":{"type":"string","description":"Free text on the shipment."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The created shipments, in input order. Match them to inputs by position.","examples":[[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateShipmentsInput":{"type":"object","properties":{"shipments":{"type":"array","items":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Required. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it and the first line's warehouse decides it. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Defaults to today. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The planned delivery date. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency for every amount on the shipment. Format ISO 4217, for example 'EUR'. Omit it to use the currency of the legal entity's default accounting book, and creation fails when the entity has no default book."},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id."},"trackingNumber":{"type":"string","description":"The carrier's tracking number."},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment."},"notes":{"type":"string","description":"Free text on the shipment."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line must use the same warehouse. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to ship, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency. Omit it to take the price from the sales order line."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id. Naming it links the shipment to the order it fulfills."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch going out. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line ships from. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to ship, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches going out on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit going out. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line ships from. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units going out, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the goods from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines of the shipment. At least one is required."}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"description":"The shipments to create. At least one, and each is exactly what POST inventory/shipments takes.","examples":[[{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-19","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","currency":"EUR","notes":"Palletised","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","notes":"Ship complete"}]}]]}},"additionalProperties":false,"required":["shipments"]},"getItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Unique within the tenant. It is set when the item is created and cannot be changed.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The display name of the item.","examples":["Standard widget"]},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"notes":{"type":"string","description":"Free text on the item."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image. Absent when none is set."},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It is set when the item is created and cannot be changed. See id on GET inventory/item-types/:id.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"itemTypeName":{"type":"string","description":"The display name of the item's type.","examples":["Stocked good"]},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id.","examples":["6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b"]},"categoryName":{"type":"string","description":"The display name of the item's category.","examples":["Components"]},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction is in this unit. See id on GET inventory/unit-of-measures/:id.","examples":["77bd4c16-e1f0-426d-a98f-07b063df2d9c"]},"inventoryUnitCode":{"type":"string","description":"The code of the inventory unit.","examples":["EA"]},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"salesUnitCode":{"type":"string","description":"The code of the sales unit."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitCode":{"type":"string","description":"The code of the purchase unit."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. See id on GET inventory/unit-of-measure-groups/:id.","examples":["38b5454a-c3fe-452b-9754-61f9ead49e87"]},"unitGroupName":{"type":"string","description":"The display name of the unit of measure group.","examples":["Each"]},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Possible values: 'movingAverage', 'batch', 'serials', 'none'. 'none' is for an item that is not stocked. 'fifo' can be returned but cannot be written, because it is under development.","examples":["movingAverage"]},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Receipts and shipments of it name batches.","examples":[false]},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Receipts and shipments of it name one serial per unit.","examples":[false]},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. False for a service or charge item.","examples":[true]},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents.","examples":[true]},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents.","examples":[true]},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. False means it is retired, and historical records keep it.","examples":[true]},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Absent when there is no restriction."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning, in the item's currency. It is not the value of the stock on hand. Read that from GET inventory/inventory-levels."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price, in the item's currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. A landed cost Weight allocation fails rather than falling back when an item on the receipt has none.","examples":["1.4"]},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Possible values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Possible values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge for this item falls back to when it names none. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest temperature the item can be stored at, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest temperature the item can be stored at, in degrees Celsius."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the item was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the item record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"searchTransferOrdersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order."},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'."},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open."},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order."},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. updateLines and deleteLines address a line by it."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from. See id on GET inventory/warehouses/:id. Absent while no source warehouse has been resolved, and such a line blocks the conversion."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Always greater than zero."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line is still to be transferred."},"processedQuantity":{"type":"string","format":"decimal","description":"How much of the line a transfer has already taken."},"status":{"type":"string","description":"The state of the line. 'NEEDS_SOURCE' means no source warehouse has been resolved, and the transfer order cannot be converted until it is."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer order."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The transfer orders that match, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38","documentNumber":"WTO-1043","documentStatus":"DRAFT","documentDate":"2026-08-18","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","status":"DRAFT"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchTransferOrdersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the transfer order with this document number, for example 'WTO-1043'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to transfer orders in this status. Accepted values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. Any other value matches no transfer order."},"entityId":{"type":"string","description":"Limits results to transfer orders for this legal entity. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to transfer orders with this source warehouse on the header. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"Limits results to transfer orders with this target warehouse on the header. See id on GET inventory/warehouses/:id."},"itemId":{"type":"string","description":"Limits results to transfer orders that have a line for this item. See id on GET inventory/items/:id. The collection GET inventory/warehouse-transfer-orders cannot filter by item, because it does not return the lines."},"referenceNumber":{"type":"string","description":"Limits results to the transfer order with this reference. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to transfer orders dated on or after this date. Omit for an open-ended start. Format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to transfer orders dated on or before this date. Omit for an open-ended end. Format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to transfer orders whose record changed on or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A transfer order must match every filter you send. Omit to return all transfer orders.","examples":[{"documentStatus":"DRAFT","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of transfer orders per page. Defaults to 50, capped at 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"cancelPurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentStatus":{"type":"string","description":"The status of the purchase return after the cancellation. It is 'CANCELLED'.","examples":["CANCELLED"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings about the cancellation. Empty when there are no warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"cancelPurchaseReturnInput":{"type":"object","properties":{},"additionalProperties":false},"itemsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The item code, for example 'WIDGET-01'. Unique within the tenant. It is set when the item is created and cannot be changed.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the item.","examples":["Standard widget"]},"externalItemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your own identifier for this item in an external system."},"brandName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the brand."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the item."},"imageAvatar":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The URL of the item's avatar image. Absent when none is set."},"itemTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item's type. It is set when the item is created and cannot be changed. See id on GET inventory/item-types/:id.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"itemTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the item's type.","examples":["Stocked good"]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id.","examples":["6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b"]},"categoryName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the item's category.","examples":["Components"]},"inventoryUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction is in this unit. See id on GET inventory/unit-of-measures/:id.","examples":["77bd4c16-e1f0-426d-a98f-07b063df2d9c"]},"inventoryUnitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the inventory unit.","examples":["EA"]},"salesUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit used on sales documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"salesUnitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the sales unit."},"purchaseUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit used on purchase documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the purchase unit."},"unitGroupId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit of measure group that has the conversions between the item's units. See id on GET inventory/unit-of-measure-groups/:id.","examples":["38b5454a-c3fe-452b-9754-61f9ead49e87"]},"unitGroupName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the unit of measure group.","examples":["Each"]},"valuationMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the item's stock is valued. Possible values: 'movingAverage', 'batch', 'serials', 'none'. 'none' is for an item that is not stocked. 'fifo' can be returned but cannot be written, because it is under development.","examples":["movingAverage"]},"isBatch":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item is tracked by batch. Receipts and shipments of it name batches.","examples":[false]},"isSerial":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item is tracked by serial number. Receipts and shipments of it name one serial per unit.","examples":[false]},"isInventory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether stock levels are kept for the item. False for a service or charge item.","examples":[true]},"isSalesItem":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item can appear on sales documents.","examples":[true]},"isPurchaseItem":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item can appear on purchase documents.","examples":[true]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item can be selected on new documents. False means it is retired, and historical records keep it.","examples":[true]},"eccnNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The Export Control Classification Number."},"htsCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The country the item originates from."},"minStockLevel":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The smallest quantity any document can move. Absent when there is no restriction."},"leadTime":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The number of weeks between ordering the item and receiving it."},"weight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The weight of one item, in weightUnit. A landed cost Weight allocation fails rather than falling back when an item on the receipt has none.","examples":["1.4"]},"weightUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit weight is expressed in. Possible values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"grossWeight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The weight including packaging, in weightUnit."},"netWeight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The weight excluding packaging, in weightUnit."},"length":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The width of one item."},"height":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The height of one item."},"volumePerUnit":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The volume of one item, in volumeUnit."},"volumeUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit volumePerUnit is expressed in. Possible values: 'L'."},"defaultAllocationMode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The allocation mode a landed cost charge for this item falls back to when it names none. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item expires."},"shelfLifeDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The lowest temperature the item can be stored at, in degrees Celsius."},"storageTempMax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The highest temperature the item can be stored at, in degrees Celsius."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the item was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the item record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"createItemAttributeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the new item attribute.","examples":["9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"]},"itemId":{"type":"string","description":"The identifier of the item carrying the attribute.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The item's code, for example 'WIDGET-01'.","examples":["WIDGET-01"]},"attributeId":{"type":"string","description":"The identifier of the attribute definition.","examples":["c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48"]},"attributeName":{"type":"string","description":"The attribute's name, for example 'Colour'.","examples":["Colour"]},"valueId":{"type":"string","description":"The identifier of the chosen value.","examples":["2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03"]},"value":{"type":"string","description":"The chosen value's text, for example 'Red'.","examples":["Red"]}},"additionalProperties":false,"required":["id","itemId","attributeId"]},"createItemAttributeInput":{"type":"object","properties":{"itemId":{"type":"string","description":"The identifier of the item to tag. See id on GET inventory/items/:id.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"attributeId":{"type":"string","description":"The identifier of the attribute definition to assign.","examples":["c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48"]},"valueId":{"type":"string","description":"The identifier of the value to assign. It must be a value the attribute defines.","examples":["2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03"]}},"additionalProperties":false,"required":["itemId","attributeId","valueId"]},"bulkDeleteInventoryDecreasesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted inventory decreases, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteInventoryDecreasesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the inventory decreases to delete. All or nothing: if any is missing or committed, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"getSerialTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial transaction. Format: UUID.","examples":["b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92"]},"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit this transaction is for. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber).","examples":["7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537"]},"serialNumber":{"type":"string","description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity. Example: 'SN-000412'.","examples":["SN-000412"]},"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number. It shows the unit's current value, not the value at the time of the serial transaction.","examples":["ACME-77-000412"]},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. It shows the unit's current value, not the value at the time of the serial transaction. Format: YYYY-MM-DD.","examples":["2029-05-31"]},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. It is the unit's current `entryDate`, not the date at the time of this serial transaction.","examples":["2026-08-03"]},"isSold":{"type":"boolean","description":"Whether the unit has been sold. It shows the unit's current value, not the value at the time of the serial transaction. A unit that was sold and then returned has the value false.","examples":[true]},"transactionId":{"type":"string","description":"The unique identifier of the inventory transaction this serial transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction).","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["LAPTOP-14"]},"itemName":{"type":"string","description":"The name of the item in `itemId`.","examples":["14-inch laptop"]},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"transactionDate":{"type":"string","format":"date","description":"The date of the inventory transaction this serial transaction belongs to. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"type":"string","format":"decimal","description":"The quantity of the unit that came into stock. It is 1 when the unit came in, and 0 when only the unit's cost changed. Absent when the unit went out.","examples":["1.00"]},"outQuantity":{"type":"string","format":"decimal","description":"The quantity of the unit that went out of stock. It is 1 when the unit went out. Absent when the unit came in or only its cost changed."},"cost":{"type":"string","format":"decimal","description":"The cost of the unit, in the currency named by `currency`. When the unit comes in, it is the cost the unit was received at. When the unit goes out, it is the unit's cost at that time. On an inventory revaluation, it is the unit's new cost.","examples":["742.50"]},"currency":{"type":"string","description":"The currency that `cost` is in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the serial transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the unit itself, such as its `isSold` or `entryDate`, do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false,"required":["id","serialNumberId"]},"bulkCreatePurchaseReturnsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase return. Format: UUID."},"documentNumber":{"type":"string","description":"The purchase return number."},"documentStatus":{"type":"string","description":"The status of the purchase return. It is always 'DRAFT' on a created purchase return."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"The unique identifier of the receipt the purchase return was created against. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the receipt line or purchase order line that this line returns goods from. Format: UUID. `sourceDocumentLineType` says whether it is a receipt line or a purchase order line. See `lines[].id` on GET inventory/receipts/:id (getReceipt) or GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'InvPurchaseDeliveryLine' (a receipt line), 'PurchaseOrderLine' (a purchase order line)."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return."},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from, for purchase return lines that return goods from a purchase order line. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped, and when no purchase return line returns goods from a purchase order line."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The created purchase returns, in the order you sent them.","examples":[[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"PRTR-1043","documentStatus":"DRAFT","documentDate":"2026-08-20","returnType":"NORMAL","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","currency":"EUR","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","quantity":"30.00","unitPrice":"3.20"}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreatePurchaseReturnsInput":{"type":"object","properties":{"returns":{"type":"array","items":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD. Defaults to today's date in UTC. It cannot be in the future."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217, for example 'EUR'. If this currency differs from the legal entity's functional currency, an exchange rate between the two currencies must exist for the `documentDate`."},"returnType":{"type":"string","description":"The type of the purchase return. Defaults to 'NORMAL'. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Shipping an 'UNINVOICED_CANCELLATION' purchase return fails when a line returns more of its purchase order line than is received, not invoiced, and not already canceled. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"originalReceiptId":{"type":"string","description":"The unique identifier of the receipt the purchase return is created against. Format: UUID. The receipt must belong to the purchase return's legal entity. Setting it does not fill in the lines. Each line still names the receipt line or purchase order line it returns goods from, in `sourceDocumentLineId`. See `id` on GET inventory/receipts/:id (getReceipt)."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"notes":{"type":"string","description":"Notes on the purchase return."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It must belong to the purchase return's legal entity. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. Required. When the line returns goods from a receipt line ('InvPurchaseDeliveryLine'), it must be the same unit as on the receipt line. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It must be greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It can be zero, but not less than zero."},"sourceDocumentLineId":{"type":"string","description":"The identifier of the receipt line or purchase order line that this line returns goods from. Send the line's unique identifier or its numeric `id`. Set `sourceDocumentLineType` to say which kind of line it is. See `lines[].id` on GET inventory/receipts/:id (getReceipt) or GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Defaults to 'InvPurchaseDeliveryLine'. Accepted values: 'InvPurchaseDeliveryLine' (a receipt line), 'PurchaseOrderLine' (a purchase order line)."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned. To identify the batch, send `batchNumberId`. To take this batch from a bin, send the same value in `binLocations[].batchNumber`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch to return, in the item's stocking unit. It must be greater than zero."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being returned. Required when the item is batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned. To identify the unit, send `serialNumberId`. To take this unit from a bin, send the same value in `binLocations[].serialNumber`."}},"additionalProperties":false},"description":"The serialized units being returned, one entry for each unit. Required when the item is serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for. It must match the `batchNumber` of one of the line's batches."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for. It must match the `serialNumber` of one of the line's serials."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins to take the stock on this purchase return line from, with the quantity to take from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["itemId","locationId","quantity"]},"description":"The lines of the purchase return. Send at least one."}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"description":"The purchase returns to create. Send at least one.","examples":[[{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-20","returnType":"NORMAL","referenceNumber":"RMA-4471","notes":"Damaged in transit","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"30.00","unitPrice":"3.20","sourceDocumentLineId":"6b02f4d8-91c3-4e57-a8f6-3c1d9e70b254","sourceDocumentLineType":"InvPurchaseDeliveryLine","notes":"Cracked casings"}]}]]}},"additionalProperties":false,"required":["returns"]},"commitReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentStatus":{"type":"string","description":"The status of the receipt after committing.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The journal entry the commit posted, where it posted one.","examples":["7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the commit. An empty array on a clean run. The commit succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitReceiptInput":{"type":"object","properties":{},"additionalProperties":false},"getShipmentCarrierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment carrier.","examples":["5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"]},"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. Names are not unique, so use id to address one carrier.","examples":["DHL Express"]},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments. Absent on carriers created before the active flag existed.","examples":[true]},"vendorId":{"type":"string","description":"The unique identifier for the vendor this carrier bills through. Absent when the carrier has no vendor. See id on GET accounting/vendors/:id.","examples":["d4a71e08-6b95-4f23-b7c1-52e08a936d47"]},"vendorName":{"type":"string","description":"The name of the vendor this carrier bills through. Absent when the carrier has no vendor. It is resolved from the vendor at read time and is not stored on the carrier.","examples":["DHL International GmbH"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the carrier record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","name"]},"bulkDeleteItemCategoriesOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted item category."},"name":{"type":"string","description":"The display name the deleted category held, echoed so you can log the removal without a prior read."}},"additionalProperties":false,"required":["id","name"]},"description":"The deleted item categories, in input order. Match rows to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteItemCategoriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the item categories to delete. If any id is unknown or its category is still referenced, the whole call is rejected and nothing is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"binsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]},"binCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code that identifies the bin, for example 'A-01-1'. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created.","examples":["A-01-1"]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created.","examples":["BIN-A011"]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse the bin is in. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id.","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-02"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Main warehouse"]},"aisle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The aisle in the warehouse layout.","examples":["A"]},"rack":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The rack within the aisle.","examples":["01"]},"shelfLevel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The shelf level within the rack.","examples":["1"]},"zone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'.","examples":["Picking"]},"itemPosition":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments.","examples":[true]},"isReceivingBin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the bin feeds or receives production."},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The largest number of units the bin will hold. It is meaningful only when everything in the bin is counted in the same unit.","examples":[500]},"maxWeight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The largest weight the bin will hold, in maxWeightUnit.","examples":["250"]},"maxWeightUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit maxWeight is given in. Possible values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"maxVolume":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The largest volume the bin will hold, in maxVolumeUnit."},"maxVolumeUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit maxVolume is given in. Possible values: 'L'."},"capacityCheckMode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What happens when a movement would exceed a limit. Possible values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it.","examples":["HardBlock"]},"tempZone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'.","examples":["Ambient"]},"tempMin":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The lowest temperature kept in the bin, in degrees Celsius."},"tempMax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether perishable stock may be kept in the bin."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the bin may be chosen for new movements. When false, the stock already in the bin stays there but no new movement can be assigned to it.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bin was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bin record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"searchLandedCostsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID."},"documentNumber":{"type":"string","description":"The landed cost number, for example 'LC-1007'."},"documentStatus":{"type":"string","description":"The status of the landed cost. Possible values: 'DRAFT', 'COMMITTED'."},"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"entityName":{"type":"string","description":"The name of the legal entity in `entityId`."},"currency":{"type":"string","description":"The currency of every amount on the landed cost, which is the functional currency of its legal entity. Format: ISO 4217, for example 'GBP'."},"notes":{"type":"string","description":"Free text on the landed cost."},"totalChargeAmount":{"type":"string","format":"decimal","description":"The total of the selected charges, in the landed cost's currency."},"receiptCount":{"type":"number","description":"The number of receipts on the landed cost."},"chargeCount":{"type":"number","description":"The number of charges on the landed cost."},"allocationLineCount":{"type":"number","description":"The number of allocation lines on the landed cost."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the landed cost was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the landed cost last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"receiptNumber":{"type":"string","description":"The receipt's number."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format: YYYY-MM-DD."},"documentStatus":{"type":"string","description":"The status of the receipt. See `documentStatus` on GET inventory/receipts/:id (getReceipt)."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the receipt line. Format: UUID. It is the `id` you send in `selectedLineIds`. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"isSelected":{"type":"boolean","description":"Whether the charges are spread over the line."},"itemId":{"type":"string","description":"The unique identifier of the item received on the line. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that received the stock on the receipt line. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of stock the receipt line brought in, in the unit of measure used on the receipt line. It is the quantity received, not the quantity in stock now. See `lines[].unitId` on GET inventory/receipts/:id (getReceipt)."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of stock the receipt line brought in, in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The price the line was received at, per unit, in the landed cost's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the landed cost's currency."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt. Every line is included, whether or not the charges are spread over it."}},"additionalProperties":false,"required":["id"]},"description":"The receipts whose stock the charges are spread over, with their lines."},"charges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"vendorBillId":{"type":"string","description":"The unique identifier of the vendor bill the line belongs to. Format: UUID. See `id` on GET accounting/vendor-bills/:id (getVendorBill)."},"vendorBillNumber":{"type":"string","description":"The vendor bill's number."},"itemId":{"type":"string","description":"The unique identifier of the item on the vendor bill line. Format: UUID. Absent when the line has no item. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`. When the vendor bill line has no item, the line's description is used."},"allocationMode":{"type":"string","description":"How this charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the charge this landed cost takes, in the landed cost's currency."},"allocatedAmount":{"type":"string","format":"decimal","description":"The amount of the charge that the commit used (allocated), in the landed cost's currency. After the commit, it equals `amount`. It is absent before the commit, and on charges whose `isSelected` is false."},"isSelected":{"type":"boolean","description":"Whether the charge is spread over the receipt lines. A charge set to false is kept in the landed cost's charges, but the commit does not spread it."}},"additionalProperties":false,"required":["id"]},"description":"The charges of the landed cost. Each charge comes from a line of a vendor bill."},"allocationLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the allocation line. It is a number sent as a string, not a UUID."},"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"itemId":{"type":"string","description":"The unique identifier of the item on the receipt line. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that received the stock on the receipt line. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"quantity":{"type":"string","format":"decimal","description":"The quantity received on the receipt line, in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item in the warehouse before the charges, in the landed cost's currency, at the time the landed cost was created or last updated. It is the item's average cost, or the receipt line's unit price when there is no average cost. When you commit the landed cost, the commit uses the item's cost at that moment, which can differ from this cost."},"additionalCostAmount":{"type":"string","format":"decimal","description":"This receipt line's share of the charges, in the landed cost's currency. It is the share for the whole line, not for one unit."},"newUnitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item with the charges, in the landed cost's currency. It is `currentUnitCost` plus this line's share of the charges for one unit. The share for one unit is `additionalCostAmount` divided by `quantity`. The commit can end with a different cost, because it uses the item's cost at the time of the commit."},"revaluationDocuments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the inventory revaluation. Format: UUID. See `id` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation)."},"documentNumber":{"type":"string","description":"The inventory revaluation number."},"documentStatus":{"type":"string","description":"The status of the inventory revaluation."}},"additionalProperties":false,"required":["id"]},"description":"The inventory revaluations that the commit created for this allocation line. It is empty before the commit. It has more than one inventory revaluation when the line's charges have different expense accounts or costing element types."}},"additionalProperties":false,"required":["id"]},"description":"The allocation of the charges over the receipt lines, with one allocation line for each selected receipt line that has an inventory item. It is calculated when the landed cost is created or updated."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The matching landed costs in this response. When more landed costs match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","currency":"GBP","totalChargeAmount":"240","receiptCount":1,"chargeCount":1,"allocationLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","receipts":[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","quantity":"40","unitPrice":"12","lineTotal":"480"}]}],"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}],"allocationLines":[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchLandedCostsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the landed cost with this number, for example 'LC-1007'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to landed costs with this status. Accepted values: 'DRAFT', 'COMMITTED'."},"entityId":{"type":"string","description":"Limits results to landed costs of the legal entity with this unique identifier. Format: UUID. See `id` on GET base/entities (entities)."},"receiptId":{"type":"string","description":"Limits results to landed costs that include the receipt with this unique identifier. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"vendorBillId":{"type":"string","description":"Limits results to landed costs with a charge from the vendor bill with this unique identifier. Format: UUID. See `id` on GET accounting/vendor-bills/:id (getVendorBill)."},"itemId":{"type":"string","description":"Limits results to landed costs with an allocation line for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"fromDate":{"type":"string","format":"date","description":"Limits results to landed costs with a `documentDate` on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to landed costs with a `documentDate` on or before this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to landed costs whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A landed cost must match every filter you send. Send an empty object to return all landed costs.","examples":[{"documentStatus":"DRAFT"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of landed costs per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"unitOfMeasuresRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. It is unique within the tenant.","examples":["KG"]},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'.","examples":["Kilogram"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the unit of measure record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"warehouseTransferOrdersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transfer order's number, for example 'WTO-1043'.","examples":["WTO-1043"]},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.","examples":["DRAFT"]},"documentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the transfer order is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your own reference on the transfer order.","examples":["REPLEN-2026-33"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity the transfer order belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Central warehouse"]},"targetLocationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"targetLocationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Northern depot"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the document."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines on the transfer order.","examples":[1]},"openLineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How many lines still have quantity left to transfer. Zero means everything has been taken.","examples":[1]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.104Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"deleteShipmentCarrierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted shipment carrier.","examples":["b81f4c60-27da-4e15-9f33-6c0a5d82e714"]},"name":{"type":"string","description":"The name the deleted carrier held.","examples":["In-house fleet"]}},"additionalProperties":false,"required":["id","name"]},"searchLandedCostItemsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost item. Format: UUID."},"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. Absent when the landed cost item covers only an account. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. Absent when the landed cost item covers only an item. See `id` on GET accounting/accounts/:id (getAccount)."},"accountNumber":{"type":"string","description":"The number of the account in `accountId`."},"accountName":{"type":"string","description":"The name of the account in `accountId`."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type. Absent when the landed cost item has none."},"costingElementTypeCode":{"type":"string","description":"The code of the costing element type in `costingElementTypeId`."},"costingElementTypeName":{"type":"string","description":"The name of the costing element type in `costingElementTypeId`."},"active":{"type":"boolean","description":"Whether the landed cost item is active."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the landed cost item was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the landed cost item last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The matching landed cost items in this response. When more landed cost items match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Weight","costingElementTypeId":"c4a90e21-7b35-4d18-9e02-6f13a85c7d40","costingElementTypeCode":"FRT","costingElementTypeName":"Freight","active":true,"createdDate":"2026-08-01T11:02:19.880Z","lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchLandedCostItemsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"itemId":{"type":"string","description":"Limits results to landed cost items for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"accountId":{"type":"string","description":"Limits results to landed cost items for the general ledger account with this unique identifier. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"allocationMode":{"type":"string","description":"Limits results to landed cost items with this allocation mode. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"costingElementTypeId":{"type":"string","description":"Limits results to landed cost items for the costing element type with this unique identifier. Format: UUID."},"active":{"type":"boolean","description":"Limits results to active landed cost items when true, and to inactive landed cost items when false."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to landed cost items whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A landed cost item must match every filter you send. Send an empty object to return all landed cost items.","examples":[{"allocationMode":"Weight","active":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of landed cost items per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"createWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'.","examples":["WTR-2291"]},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer line. updateLines and deleteLines address lines by it."},"itemId":{"type":"string","description":"The item being moved. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from, the document's warehouse applied to every line. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much moves, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"transferCost":{"type":"string","format":"decimal","description":"What one unit left the source warehouse at, in the transfer's currency. The valuation method sets it at commit. Absent on a draft."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit on an intercompany transfer, in the contractual currency. Supplied on create."},"totalTransferValue":{"type":"string","format":"decimal","description":"The line's total on an intercompany transfer, in the contractual currency: totalTransferValue = unitTransferValue x quantity. Written by the platform."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this line has come back on an intercompany return."},"status":{"type":"string","description":"The status of the line."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number. See id on GET inventory/batch-numbers/:id."},"batchNumber":{"type":"string","description":"The batch number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"What this batch moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The batches that make up the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number. See id on GET inventory/serial-numbers/:id."},"serialNumber":{"type":"string","description":"The serial number."},"quantity":{"type":"string","format":"decimal","description":"Always one, for a serialized unit."},"unitCost":{"type":"string","format":"decimal","description":"What this unit moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The serialized units that move."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"fromBinLocationCode":{"type":"string","description":"The code of that bin."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"toBinLocationCode":{"type":"string","description":"The code of that bin."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer. The collection GET inventory/warehouse-transfers returns lineCount in place of these.","examples":[[{"id":"7d2b48e1-95c3-4a06-8f17-3e5a9c06b2d4","itemCode":"WIDGET-01","quantity":"24","inventoryQuantity":"24"}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"createWarehouseTransferInput":{"type":"object","properties":{"locationId":{"type":"string","description":"The warehouse the goods leave, applied to every line. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. It must differ from locationId. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"entityId":{"type":"string","description":"The legal entity. Defaults to the entity that owns the source warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"notes":{"type":"string","description":"Free text on the document."},"transferType":{"type":"string","description":"The type of transfer to create. Accepted values: 'NORMAL', 'INTERCOMPANY'. Defaults to 'NORMAL'. 'INTERCOMPANY_RETURN' is created by the intercompany return flow, not here."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods. Required when transferType is 'INTERCOMPANY'. See id on GET base/entities."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Required when transferType is 'INTERCOMPANY'. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit, in the transfer's contractual currency. Required on an intercompany transfer. The two entities agree the price, and the API cannot derive it from a cost."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the goods leave. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches that make up the line's quantity. Required for a batch-tracked item, and they must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the goods leave. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units that move. Required for a serialized item, one entry per unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false,"required":["quantity"]},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one. Leave both names off for a quantity that moves at line level."}},"additionalProperties":false,"required":["itemId","quantity"]},"description":"The lines of the transfer. At least one is required.","examples":[[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"24"}]]}},"additionalProperties":false,"required":["locationId","targetLocationId","lines"]},"getLandedCostItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost item. Format: UUID.","examples":["9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"]},"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. Absent when the landed cost item covers only an account. See `id` on GET inventory/items/:id (getItem).","examples":["3d81e07c-95a2-4f63-b1c8-27e5a94d0b36"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["SVC-FREIGHT"]},"itemName":{"type":"string","description":"The name of the item in `itemId`.","examples":["Inbound freight"]},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. Absent when the landed cost item covers only an item. See `id` on GET accounting/accounts/:id (getAccount)."},"accountNumber":{"type":"string","description":"The number of the account in `accountId`."},"accountName":{"type":"string","description":"The name of the account in `accountId`."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'.","examples":["Weight"]},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type. Absent when the landed cost item has none.","examples":["c4a90e21-7b35-4d18-9e02-6f13a85c7d40"]},"costingElementTypeCode":{"type":"string","description":"The code of the costing element type in `costingElementTypeId`.","examples":["FRT"]},"costingElementTypeName":{"type":"string","description":"The name of the costing element type in `costingElementTypeId`.","examples":["Freight"]},"active":{"type":"boolean","description":"Whether the landed cost item is active.","examples":[true]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the landed cost item was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the landed cost item last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"updateInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned.","examples":["DEC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse location.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse location.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory decrease.","examples":["Forklift damage, aisle 4 — two more found"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:40:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"14.00","inventoryQuantity":"14.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"14.00","inventoryQuantity":"14.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"14.00","inventoryQuantity":"14.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"updateInventoryDecreaseInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"A new document date. Changing it moves the posting period. Use format YYYY-MM-DD."},"reasonCodeId":{"type":"string","description":"A new reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the inventory decrease. Pass an empty string to clear it.","examples":["Forklift damage, aisle 4 — two more found"]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of lines to remove. Applied before updateLines and createLines."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line belonging to another document is rejected, not skipped."},"itemId":{"type":"string","description":"A new item for the line. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"A new unit for the line's quantity. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, in the line's unit. Must be greater than zero when given."},"unitPrice":{"type":"string","format":"decimal","description":"A new value of one unit, in the inventory decrease's currency. Must be greater than zero when given. Omit it to keep valuing the stock at the cost it already has."},"notes":{"type":"string","description":"Free text on the line. Pass an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch being removed. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the document's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to remove, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches to take the quantity from. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Every batch named must already exist for the item, since a decrease removes lots and does not create them. On update, this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit being removed. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the document's warehouse. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The units to remove, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Every unit named must already exist. On update, this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the quantity from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number the line does not have is rejected rather than reinterpreted."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity comes out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line. On update, this replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","quantity":"14.00","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"14.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"14.00","batchNumber":"LOT-2026-08-14"}]}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to remove, in that unit. A positive number greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency. Optional: omit it to value the stock at the cost it already has, which is what a write-off ordinarily wants. A supplied value must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch being removed. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the document's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to remove, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches to take the quantity from. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Every batch named must already exist for the item, since a decrease removes lots and does not create them."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit being removed. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the document's warehouse. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The units to remove, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Every unit named must already exist."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the quantity from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number the line does not have is rejected rather than reinterpreted."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity comes out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity"]},"description":"The lines to add. They use the document's existing location, so a document with no lines yet cannot take new ones."}},"additionalProperties":false},"searchBinsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bin."},"binCode":{"type":"string","description":"The short code that identifies the bin, for example 'A-01-1'. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created."},"barcode":{"type":"string","description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the bin is in. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"aisle":{"type":"string","description":"The aisle in the warehouse layout."},"rack":{"type":"string","description":"The rack within the aisle."},"shelfLevel":{"type":"string","description":"The shelf level within the rack."},"zone":{"type":"string","description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'."},"itemPosition":{"type":"string","description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments."},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"type":"number","description":"The largest number of units the bin will hold. It is meaningful only when everything in the bin is counted in the same unit."},"maxWeight":{"type":"string","format":"decimal","description":"The largest weight the bin will hold, in maxWeightUnit."},"maxWeightUnit":{"type":"string","description":"The unit maxWeight is given in. Possible values: 'G', 'Kg', 'Lbs'."},"maxVolume":{"type":"string","format":"decimal","description":"The largest volume the bin will hold, in maxVolumeUnit."},"maxVolumeUnit":{"type":"string","description":"The unit maxVolume is given in. Possible values: 'L'."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Possible values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it."},"tempZone":{"type":"string","description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'."},"tempMin":{"type":"string","format":"decimal","description":"The lowest temperature kept in the bin, in degrees Celsius."},"tempMax":{"type":"string","format":"decimal","description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin."},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. When false, the stock already in the bin stays there but no new movement can be assigned to it."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the bin was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bin record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The bins on this page, oldest first. An empty array when nothing matches.","examples":[[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"isReceivingBin":false,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","supportsPerishable":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more bins remain beyond this page."}},"additionalProperties":false,"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchBinsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"binCode":{"type":"string","description":"Limits results to the bin with this code. The match is exact. Codes are unique, so this matches at most one bin."},"barcode":{"type":"string","description":"Limits results to the bin with this barcode. The match is exact. Barcodes are unique, so this matches at most one bin."},"locationId":{"type":"string","description":"Limits results to bins in the warehouse with this identifier. An identifier that is not a warehouse matches nothing. See id on GET inventory/warehouses/:id."},"aisle":{"type":"string","description":"Limits results to bins in this aisle. The match is exact."},"rack":{"type":"string","description":"Limits results to bins on this rack. The match is exact."},"zone":{"type":"string","description":"Limits results to bins in this zone. The match is exact."},"isPickingBin":{"type":"boolean","description":"Limits results to picking locations when true, or to bins that are not when false. Omit to match both."},"isReceivingBin":{"type":"boolean","description":"Limits results to bins that stage newly received goods when true, or to bins that do not when false. Omit to match both."},"isProductionBin":{"type":"boolean","description":"Limits results to bins that feed or receive production when true, or to bins that do not when false. Omit to match both."},"supportsPerishable":{"type":"boolean","description":"Limits results to bins that may keep perishable stock when true, or to bins that may not when false. Omit to match both."},"capacityCheckMode":{"type":"string","description":"Limits results to bins with this capacity check mode. Accepted values: 'HardBlock', 'SoftWarning'."},"tempZone":{"type":"string","description":"Limits results to bins in this temperature zone. The match is exact."},"active":{"type":"boolean","description":"Limits results to bins that may be chosen for new movements when true, or to retired ones when false. Omit to match both."},"withoutLimits":{"type":"boolean","description":"True to return only bins with no quantity, weight or volume limit above zero, the ones no capacity check can protect."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to bins changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A bin must match every filter you send. Send an empty object to return all bins.","examples":[{"withoutLimits":true,"isPickingBin":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of bins per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"deleteLandedCostItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted landed cost item. Format: UUID.","examples":["5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"]}},"additionalProperties":false,"required":["id"]},"createAccountDeterminationRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]}},"additionalProperties":false,"required":["id"]},"createAccountDeterminationRuleInput":{"type":"object","properties":{"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique.","examples":["Finished goods — receipts"]},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used.","examples":[10]},"isActive":{"type":"boolean","description":"Whether the rule is active. Defaults to true."},"matching":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"The unique identifier of the accounting book this rule applies to. Format: UUID. Required: leaving it out returns BOOK_REQUIRED. See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"type":"string","description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' applies to every transaction type, the same as leaving the field out. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"required":["entityId"],"description":"The dimensions this rule applies to. If you leave out the item type, item category, location, or transaction type, the rule applies to every value of it.","examples":[{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"}]},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"type":"string","description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"type":"string","description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"type":"string","description":"The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"type":"string","description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"type":"string","description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"type":"string","description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"type":"string","description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"type":"string","description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"type":"string","description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"type":"string","description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"type":"string","description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"type":"string","description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"type":"string","description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"type":"string","description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"type":"string","description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"type":"string","description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches.","examples":[{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}]},"reasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the twenty accounts can be overridden."}},"additionalProperties":false,"required":["reasonCodeId","accountId","parentAccountType"]},"description":"The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by `parentAccountType`. An inventory increase or decrease created by manufacturing that has its own offset account uses that account instead of an override. Each combination of `reasonCodeId` and `parentAccountType` can appear only once on a rule."}},"additionalProperties":false,"required":["ruleName","matching"]},"createLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"documentNumber":{"type":"string","description":"The landed cost number, for example 'LC-1007'.","examples":["LC-1007"]},"documentStatus":{"type":"string","description":"The status of the created landed cost. It is always 'DRAFT'.","examples":["DRAFT"]},"allocationLineCount":{"type":"number","description":"The number of allocation lines on the landed cost. There is one allocation line for each selected receipt line that has an inventory item and takes a share of the charges. When it is 0, no stock takes a share of the charges, and committing the landed cost fails.","examples":[1]}},"additionalProperties":false,"required":["id","documentStatus"]},"createLandedCostInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. It cannot be changed later. See `id` on GET base/entities (entities).","examples":["7039b992-696a-40c7-a181-51759304ef83"]},"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD. Defaults to today's date in UTC. The inventory revaluations that the commit creates have this date, so it sets the date of the change in the stock's value. It must fall in an open accounting period."},"notes":{"type":"string","description":"Free text on the landed cost."},"receipts":{"type":"array","items":{"type":"object","properties":{"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"selectedLineIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the receipt lines to spread the charges over. Format: UUID. Each identifier must be the `id` of a line of the receipt named by `receiptId`. Omit to spread the charges over all of the receipt's lines. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."}},"additionalProperties":false,"required":["receiptId"]},"description":"The receipts whose stock the charges are spread over. Send at least one. Every receipt must have the `documentStatus` 'COMMITTED'.","examples":[[{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}]]},"charges":{"type":"array","items":{"type":"object","properties":{"chargeId":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. The vendor bill is taken from the line, so you do not send it. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"allocationMode":{"type":"string","description":"How the charge is spread (allocated) over the receipt lines. Defaults to the `defaultAllocationMode` of the item on the vendor bill line, or to 'Equal' when there is no such default. To use the mode set on the matching landed cost item, send the `allocationMode` from GET inventory/landed-costs/vendor-bill-lines. 'Weight' needs a gross weight, weight, or net weight on the item of every selected receipt line. 'Volume' needs a volume per unit on the item of every selected receipt line, or else a length, width, and height on every one. Weights and volumes are converted to the same unit before the charge is spread. See `defaultAllocationMode`, `grossWeight`, `weight`, `netWeight`, `weightUnit`, `volumePerUnit`, `volumeUnit`, `length`, `width`, and `height` on GET inventory/items/:id (getItem). Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the vendor bill line to use, in the functional currency of the landed cost's legal entity. It must be more than 0. To use what is left on the line, send `functionalLineTotal` minus `functionalAllocatedAmount` from GET inventory/landed-costs/vendor-bill-lines. The commit fails if this amount is more than what is left on the line."},"isSelected":{"type":"boolean","description":"Whether to spread the charge over the receipt lines. Defaults to true. A charge set to false is kept in the landed cost's charges, so you can set it back to true later, but the commit does not spread it."}},"additionalProperties":false,"required":["chargeId","amount"]},"description":"The charges to spread over the stock. Each charge comes from a line of an approved vendor bill. Send at least one.","examples":[[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"Quantity","amount":"240"}]]}},"additionalProperties":false,"required":["entityId","receipts","charges"]},"bulkCreateReceiptsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt."},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created."},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity the receipt belongs to."},"entityName":{"type":"string","description":"The name of that legal entity."},"businessPartnerId":{"type":"string","description":"The vendor the goods came from."},"businessPartnerName":{"type":"string","description":"The name of that vendor."},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency."},"notes":{"type":"string","description":"Free text on the receipt."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The created receipts, in input order. Match them to inputs by index.","examples":[[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateReceiptsInput":{"type":"object","properties":{"receipts":{"type":"array","items":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The vendor the goods came from. Required."},"entityId":{"type":"string","description":"The legal entity. Omit it and the first line's warehouse decides it, but a receipt of only service lines has no warehouse, so supply it there."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Use format YYYY-MM-DD. Defaults to today."},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency for every amount on the receipt. Format ISO 4217, for example 'EUR'. Defaults to the vendor's or the entity's, as the platform resolves it."},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment. Free text: no format check, and no lookup against a carrier."},"notes":{"type":"string","description":"Free text on the document."},"lines":{"type":"array","items":{"type":"object","properties":{"lineType":{"enum":["Inventory","Service","Expense"],"description":"What this line receives. Defaults to Inventory. An Inventory line needs itemId, unitId, locationId and quantity, because it moves stock into a warehouse. A Service or Expense line needs serviceDescription and an amount, and has no item or warehouse. A line with a description and no item is taken as a Service line."},"itemId":{"type":"string","description":"The item received. Required on an Inventory line, and not used on a Service or Expense line."},"serviceDescription":{"type":"string","description":"What was bought. Required on a Service or Expense line, and not used on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods go into. Required on an Inventory line."},"unitId":{"type":"string","description":"The unit the quantity is counted in. Required on an Inventory line."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in that unit. Required on an Inventory line, and greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency. Leave it out to have it calculated as quantity × unitPrice, rounded to the currency's decimals. When quantity and unitPrice are also given it must equal that, once rounded the same way, or the request fails with LINE_TOTAL_MISMATCH. On a Service or Expense line without a quantity or unitPrice it is taken as given, and such a line needs this or a unitPrice."},"expenseAccountId":{"type":"string","description":"The general ledger account to charge. Required on a Service or Expense line, or the request fails with INCOMPLETE_LINE. Not used on an Inventory line."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line receives against, as its id under lines on GET accounting/purchase-orders/:id. Its numeric id in string form is also accepted. The line type is set from it."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."}},"additionalProperties":false},"description":"The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods go into."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries."}},"additionalProperties":false},"description":"The lines of the receipt. At least one is required."}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"description":"The receipts to create. At least one, and each is exactly what POST inventory/receipts takes.","examples":[[{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-14","deliveryDate":"2026-08-14","referenceNumber":"DN-77120","currency":"EUR","notes":"Received at the back dock","lines":[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]}]]}},"additionalProperties":false,"required":["receipts"]},"deleteItemCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted item category.","examples":["9d61b0af-3c58-4e17-b942-06ea8c73f215"]},"name":{"type":"string","description":"The display name the deleted category held, echoed so you can log the removal without a prior read.","examples":["Pilot programme"]}},"additionalProperties":false,"required":["id","name"]},"bulkCreateReasonCodesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created reason code."}},"additionalProperties":false,"required":["id"]},"description":"The created reason codes, in the same order as the input. Match entries to inputs by index.","examples":[[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"},{"id":"1f5b83d0-6c47-4a92-b8e1-0d472a95c3f6"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateReasonCodesInput":{"type":"object","properties":{"reasonCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. Required. It must be unique within the tenant and within this request."},"description":{"type":"string","description":"A free-form description of what the reason code means. Omit for none."},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. Defaults to true."},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect. Defaults to false."},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The document types this reason code may be selected on. Required, but may be empty. An unrecognized value fails the whole call with UNKNOWN_DOCUMENT_TYPES, which names this entry's index."}},"additionalProperties":false,"required":["code","documentTypes"]},"description":"The reason codes to create. If any entry is invalid, nothing is created and the whole call fails.","examples":[[{"code":"DAMAGE","description":"Stock damaged in the warehouse","requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"]},{"code":"CYCLECOUNT","description":"Correction from a cycle count","documentTypes":["InventoryIncrease","InventoryDecrease"]}]]}},"additionalProperties":false,"required":["reasonCodes"]},"createBinOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]},"binCode":{"type":"string","description":"The bin's code.","examples":["A-01-1"]}},"additionalProperties":false,"required":["id"]},"createBinInput":{"type":"object","properties":{"binCode":{"type":"string","description":"The short code that identifies the bin, for example 'A-01-1'. Required. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created.","examples":["A-01-1"]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the bin is in. Required. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id.","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"barcode":{"type":"string","description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created."},"aisle":{"type":"string","description":"The aisle in the warehouse layout.","examples":["A"]},"rack":{"type":"string","description":"The rack within the aisle.","examples":["01"]},"shelfLevel":{"type":"string","description":"The shelf level within the rack.","examples":["1"]},"zone":{"type":"string","description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'.","examples":["Picking"]},"itemPosition":{"type":"string","description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments.","examples":[true]},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"type":"number","description":"The largest number of units the bin will hold, above zero. Leave it out for no quantity limit. It is meaningful only when everything in the bin is counted in the same unit."},"maxWeight":{"type":"string","format":"decimal","description":"The largest weight the bin will hold, in maxWeightUnit, above zero. Send it together with maxWeightUnit, or leave both out for no weight limit.","examples":["250"]},"maxWeightUnit":{"type":"string","description":"The unit maxWeight is given in. Accepted values: 'G', 'Kg', 'Lbs'. Send it together with maxWeight, or leave both out.","examples":["Kg"]},"maxVolume":{"type":"string","format":"decimal","description":"The largest volume the bin will hold, in maxVolumeUnit, above zero. Send it together with maxVolumeUnit, or leave both out for no volume limit."},"maxVolumeUnit":{"type":"string","description":"The unit maxVolume is given in. Accepted values: 'L'. Send it together with maxVolume, or leave both out."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Accepted values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it.","examples":["HardBlock"]},"tempZone":{"type":"string","description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'."},"tempMin":{"type":"string","format":"decimal","description":"The lowest temperature kept in the bin, in degrees Celsius. It must not be above tempMax."},"tempMax":{"type":"string","format":"decimal","description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin."},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. Defaults to true."}},"additionalProperties":false,"required":["binCode","locationId"]},"searchAccountDeterminationRulesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule. Format: UUID."},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique."},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used. A rule with no `priority` counts as 0."},"isActive":{"type":"boolean","description":"Whether the rule is active."},"matching":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"The unique identifier of the accounting book this rule applies to. Format: UUID. Absent only on some rules created before a book was required. Set a book on such a rule with PATCH inventory/account-determination-rules/:id (updateAccountDeterminationRule). See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"type":"string","description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' means every transaction type. A rule stored with no transaction type is returned as 'DEFAULT'. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"required":["entityId"],"description":"The dimensions this rule applies to. When the item type, item category, location, or transaction type is absent, the rule applies to every value of it."},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"type":"string","description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"type":"string","description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"type":"string","description":"The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"type":"string","description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"type":"string","description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"type":"string","description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"type":"string","description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"type":"string","description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"type":"string","description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"type":"string","description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"type":"string","description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"type":"string","description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"type":"string","description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"type":"string","description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"type":"string","description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"type":"string","description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches. Only the accounts set on the rule are included in the response."},"reasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the override. Format: UUID."},"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the twenty accounts can be overridden."}},"additionalProperties":false,"required":["id","reasonCodeId","accountId","parentAccountType"]},"description":"The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by `parentAccountType`. An inventory increase or decrease created by manufacturing that has its own offset account uses that account instead of an override. An empty array when the rule has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the rule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Requests that change only the reason-code overrides do not update this field."}},"additionalProperties":false,"required":["id","ruleName","matching","accounts","reasonCodeOverrides"]},"description":"The matching rules in this response. When more rules match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts","priority":10,"isActive":true,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"},"reasonCodeOverrides":[],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountDeterminationRulesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"entityId":{"type":"string","description":"Limits results to rules of the legal entity with this unique identifier. Format: UUID. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"Limits results to rules for the accounting book with this unique identifier. Format: UUID. Rules without a book are not returned. See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"Limits results to rules for the item type with this unique identifier. Format: UUID. Wildcard rules are not returned. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"Limits results to rules for the item category with this unique identifier. Format: UUID. Wildcard rules and rules for a parent category are not returned. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"Limits results to rules for the warehouse location with this unique identifier. Format: UUID. Wildcard rules are not returned. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"Limits results to rules for this transaction type. Filtering on 'DEFAULT' returns the rules that apply to every transaction type, including rules stored with no transaction type."},"isActive":{"type":"boolean","description":"Limits results to active rules when true, and to inactive rules when false."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to rules whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A rule must match every filter you send. Send an empty object to return all rules.","examples":[{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","isActive":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of rules per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"updateBinOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]}},"additionalProperties":false,"required":["id"]},"updateBinInput":{"type":"object","properties":{"aisle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The aisle in the warehouse layout. Send null to clear it."},"rack":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The rack within the aisle. Send null to clear it."},"shelfLevel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The shelf level within the rack. Send null to clear it."},"zone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'. Send null to clear it."},"itemPosition":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The position within the shelf, where a bin is subdivided further. Send null to clear it."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments."},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The largest number of units the bin will hold, above zero. It is meaningful only when everything in the bin is counted in the same unit. Send null to remove the limit."},"maxWeight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The largest weight the bin will hold, in maxWeightUnit, above zero. The bin must have a maxWeightUnit, from this request or already. Send null to remove the limit; its maxWeightUnit is removed with it.","examples":["300"]},"maxWeightUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit maxWeight is given in. Accepted values: 'G', 'Kg', 'Lbs'. Send it together with maxWeight, or leave both out. It can be null only when maxWeight is null too, and a null maxWeight already removes it."},"maxVolume":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The largest volume the bin will hold, in maxVolumeUnit, above zero. The bin must have a maxVolumeUnit, from this request or already. Send null to remove the limit; its maxVolumeUnit is removed with it."},"maxVolumeUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit maxVolume is given in. Accepted values: 'L'. Send it together with maxVolume, or leave both out. It can be null only when maxVolume is null too, and a null maxVolume already removes it."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Accepted values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it.","examples":["HardBlock"]},"tempZone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'. Send null to clear it."},"tempMin":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The lowest temperature kept in the bin, in degrees Celsius. It must not be above tempMax. Send null to remove the lower bound."},"tempMax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The highest temperature kept in the bin, in degrees Celsius. Send null to remove the upper bound."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin."},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. Set it to false to retire the bin without deleting it: the stock already in it stays where it is."}},"additionalProperties":false},"bulkCreateWarehouseTransfersOutput":{"type":"object","properties":{"warehouseTransfers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer."},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'."},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed."},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'."},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The created transfers, in input order. Headers only. Read one in full on GET inventory/warehouse-transfers/:id.","examples":[[{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentNumber":"WTR-2291","documentStatus":"DRAFT","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]}},"additionalProperties":false,"required":["warehouseTransfers"]},"bulkCreateWarehouseTransfersInput":{"type":"object","properties":{"warehouseTransfers":{"type":"array","items":{"type":"object","properties":{"locationId":{"type":"string","description":"The warehouse the goods leave, applied to every line. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. It must differ from locationId. See id on GET inventory/warehouses/:id."},"entityId":{"type":"string","description":"The legal entity. Defaults to the entity that owns the source warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer. Defaults to today. Use format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"notes":{"type":"string","description":"Free text on the document."},"transferType":{"type":"string","description":"The type of transfer to create. Accepted values: 'NORMAL', 'INTERCOMPANY'. Defaults to 'NORMAL'. 'INTERCOMPANY_RETURN' is created by the intercompany return flow, not here."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods. Required when transferType is 'INTERCOMPANY'. See id on GET base/entities."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Required when transferType is 'INTERCOMPANY'. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit, in the transfer's contractual currency. Required on an intercompany transfer. The two entities agree the price, and the API cannot derive it from a cost."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the goods leave. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches that make up the line's quantity. Required for a batch-tracked item, and they must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the goods leave. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units that move. Required for a serialized item, one entry per unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false,"required":["quantity"]},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one. Leave both names off for a quantity that moves at line level."}},"additionalProperties":false,"required":["itemId","quantity"]},"description":"The lines of the transfer. At least one is required."}},"additionalProperties":false,"required":["locationId","targetLocationId","lines"]},"description":"The transfers to create. All or nothing: if any is rejected, none is created.","examples":[[{"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"24"}]}]]}},"additionalProperties":false,"required":["warehouseTransfers"]},"createShipmentCarrierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created shipment carrier.","examples":["5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"]}},"additionalProperties":false,"required":["id"]},"createShipmentCarrierInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. It is not checked for uniqueness.","examples":["DHL Express"]},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments. Defaults to true.","examples":[true]},"vendorId":{"type":"string","description":"The unique identifier for the vendor this carrier bills through. Omit for a carrier with no vendor. An identifier matching no vendor fails the call with VENDOR_NOT_FOUND. See id on GET accounting/vendors/:id.","examples":["d4a71e08-6b95-4f23-b7c1-52e08a936d47"]}},"additionalProperties":false,"required":["name"]},"serialNumbersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial number. Format: UUID.","examples":["c3f80a41-6d29-4b57-8e10-92a4d7b05f63"]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity.","examples":["SN-000418"]},"manufacturerSerialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The manufacturer's serial number."},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item this serial number belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["afb4492d-52fc-44c5-ab10-71ad4a615496"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["SERIAL-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse the unit is in, or was last in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-02"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the legal entity the unit belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"inStock":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The current quantity of the unit in stock. It is 1 when the unit is in stock and 0 when it is not, including before the unit is received.","examples":["1"]},"isSold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the unit has been sold.","examples":[false]},"lastCostChangeDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the `cost` or `afterSaleCost` of the unit last changed. It is the date the change was committed, not the date of the document. Format: YYYY-MM-DD."},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the unit expires. Format: YYYY-MM-DD."},"entryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the unit's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase receives the unit, it is the date entered for the unit on that document, or the document's date when none was entered. Each later receipt or inventory increase for the unit sets a new date. A warehouse transfer does not change the date, including a transfer between legal entities."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the serial number is active.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the serial number record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the serial number record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"bulkCreateWarehousesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created warehouse."}},"additionalProperties":false,"required":["id"]},"description":"The created warehouses, in the same order as the input. Match entries to inputs by index.","examples":[[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"},{"id":"b5390f6a-1c72-4e84-9a03-8f2d61c74e59"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateWarehousesInput":{"type":"object","properties":{"warehouses":{"type":"array","items":{"type":"object","properties":{"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. Required. It must be unique within the tenant and within this request."},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'. Required."},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. Required. An unknown identifier fails the whole call with ENTITY_NOT_FOUND, which names this entry's index. See id on GET base/entities."},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location. Required."},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. Defaults to true."},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse. Defaults to false. At most one warehouse per entity is meant to be the primary receiving warehouse. It is not enforced, and a request setting it on several is accepted."},"warehouseTypeId":{"type":"string","description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Omit to allow every document type. There is no endpoint for it."},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box."},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"postalCode":{"type":"string","description":"The postal or ZIP code."},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. It is not validated against the ISO list."},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state."}},"additionalProperties":false,"required":["locationCode","name","entityId","inventoryLocationType"]},"description":"The warehouses to create. If any entry is invalid, nothing is created and the whole call fails.","examples":[[{"locationCode":"WH-01","name":"Rotterdam Distribution Centre","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","countryCode":"NL"},{"locationCode":"WH-02","name":"Antwerp Overflow","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","countryCode":"BE"}]]}},"additionalProperties":false,"required":["warehouses"]},"searchInventoryIncreasesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase."},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The short code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'."},"notes":{"type":"string","description":"Free text on the inventory increase."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth, and unitPrice is calculated from it as lineValue divided by quantity. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"description":"The inventory increases on this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryIncreasesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the inventory increase with this document number, for example 'INC-42'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to inventory increases with this status. Accepted values: 'DRAFT', 'COMMITTED', 'CANCELLED'. Any other value matches no inventory increase."},"entityId":{"type":"string","description":"Limits results to inventory increases for this legal entity. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to inventory increases at this warehouse. See id on GET inventory/warehouses/:id."},"reasonCodeId":{"type":"string","description":"Limits results to inventory increases with this reason code. See id on GET inventory/reason-codes/:id."},"itemId":{"type":"string","description":"Limits results to inventory increases that have a line for this item. See id on GET inventory/items/:id."},"fromDate":{"type":"string","format":"date","description":"Limits results to inventory increases dated on or after this date. Omit for an open-ended start. Format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to inventory increases dated on or before this date. Omit for an open-ended end. Format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to inventory increases changed on or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The search criteria. An inventory increase must match every criterion you send. Omit to return every inventory increase.","examples":[{"documentStatus":"DRAFT","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of inventory increases per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"getAvailableChargesOutput":{"type":"object","properties":{"charges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the vendor bill line. Format: UUID. Send it as `chargeId` when you create or update a landed cost."},"vendorBillId":{"type":"string","description":"The unique identifier of the vendor bill the line belongs to. Format: UUID. See `id` on GET accounting/vendor-bills/:id (getVendorBill)."},"vendorBillNumber":{"type":"string","description":"The vendor bill's number."},"description":{"type":"string","description":"The description of the vendor bill line, for example 'Sea freight, Shanghai to Felixstowe'."},"poNumber":{"type":"string","description":"The number of the purchase order the vendor bill line is matched to. Absent when the line is not matched to a purchase order."},"billStatus":{"type":"string","description":"The status of the vendor bill. It is always 'approved'."},"billDate":{"type":"string","format":"date","description":"The date of the vendor bill. Format: YYYY-MM-DD. When the bill is in another `currency`, `functionalLineTotal` is converted to the legal entity's functional currency at the exchange rate on this date."},"dueDate":{"type":"string","format":"date","description":"The due date of the vendor bill. Format: YYYY-MM-DD."},"vendorName":{"type":"string","description":"The name of the vendor on the vendor bill."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the vendor bill belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"itemId":{"type":"string","description":"The unique identifier of the item on the vendor bill line. Format: UUID. Absent when the line has no item. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`. When the vendor bill line has no item, the line's description is used."},"allocationMode":{"type":"string","description":"The allocation mode of the landed cost item that the vendor bill line matches. To use it, send it as the charge's `allocationMode` when you create or update a landed cost. When the line's item matches one landed cost item and the line's general ledger account matches another, the mode of the item match is used. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"lineTotal":{"type":"string","format":"decimal","description":"The line's total, in the vendor bill's currency."},"allocatedAmount":{"type":"string","format":"decimal","description":"The amount of the line's total that committed landed costs have already used (allocated), in the vendor bill's currency."},"currency":{"type":"string","description":"The currency of the vendor bill. Format: ISO 4217, for example 'GBP'. It can differ from `functionalCurrency`."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the vendor bill line in the functional currency of the legal entity, converted at the exchange rate on `billDate`."},"functionalAllocatedAmount":{"type":"string","format":"decimal","description":"The amount of the line's total that committed landed costs have already used (allocated), in the functional currency of the legal entity."},"functionalCurrency":{"type":"string","description":"The functional currency of the legal entity. Format: ISO 4217, for example 'GBP'."}},"additionalProperties":false,"required":["id"]},"description":"The vendor bill lines you can add to a landed cost, newest bill date first. An empty array when there are none.","examples":[[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillId":"e0b41f76-38c9-4d52-9a1e-7c5b02d6a834","vendorBillNumber":"VB-8842","description":"Sea freight, Shanghai to Felixstowe","poNumber":"PO-4471","billStatus":"approved","billDate":"2026-08-10","vendorName":"Meridian Logistics","entityId":"7039b992-696a-40c7-a181-51759304ef83","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Quantity","lineTotal":"300","allocatedAmount":"60","currency":"GBP","functionalLineTotal":"300","functionalAllocatedAmount":"60","functionalCurrency":"GBP"}]]}},"additionalProperties":false,"required":["charges"]},"bulkCreateBinsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bin."},"binCode":{"type":"string","description":"The bin's code."}},"additionalProperties":false,"required":["id"]},"description":"The created bins, in the same order as the input. Match entries to inputs by index.","examples":[[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1"},{"id":"f0472b19-8c35-4e61-b7a2-6d05e83c1947","binCode":"A-01-2"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateBinsInput":{"type":"object","properties":{"bins":{"type":"array","items":{"type":"object","properties":{"binCode":{"type":"string","description":"The short code that identifies the bin, for example 'A-01-1'. Required. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the bin is in. Required. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id."},"barcode":{"type":"string","description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created."},"aisle":{"type":"string","description":"The aisle in the warehouse layout."},"rack":{"type":"string","description":"The rack within the aisle."},"shelfLevel":{"type":"string","description":"The shelf level within the rack."},"zone":{"type":"string","description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'."},"itemPosition":{"type":"string","description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments."},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"type":"number","description":"The largest number of units the bin will hold, above zero. Leave it out for no quantity limit. It is meaningful only when everything in the bin is counted in the same unit."},"maxWeight":{"type":"string","format":"decimal","description":"The largest weight the bin will hold, in maxWeightUnit, above zero. Send it together with maxWeightUnit, or leave both out for no weight limit."},"maxWeightUnit":{"type":"string","description":"The unit maxWeight is given in. Accepted values: 'G', 'Kg', 'Lbs'. Send it together with maxWeight, or leave both out."},"maxVolume":{"type":"string","format":"decimal","description":"The largest volume the bin will hold, in maxVolumeUnit, above zero. Send it together with maxVolumeUnit, or leave both out for no volume limit."},"maxVolumeUnit":{"type":"string","description":"The unit maxVolume is given in. Accepted values: 'L'. Send it together with maxVolume, or leave both out."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Accepted values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it."},"tempZone":{"type":"string","description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'."},"tempMin":{"type":"string","format":"decimal","description":"The lowest temperature kept in the bin, in degrees Celsius. It must not be above tempMax."},"tempMax":{"type":"string","format":"decimal","description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin."},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. Defaults to true."}},"additionalProperties":false,"required":["binCode","locationId"]},"description":"The bins to create. If any entry is invalid, nothing is created and the whole call fails.","examples":[[{"binCode":"A-01-1","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"1","isPickingBin":true},{"binCode":"A-01-2","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"2","isPickingBin":true}]]}},"additionalProperties":false,"required":["bins"]},"batchNumbersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch number. Format: UUID.","examples":["7a4e91c3-2b58-4d06-9f31-c85e207a4b19"]},"batchNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse.","examples":["LOT-2026-0448"]},"manufacturerBatchNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The manufacturer's batch number."},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item this batch belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse the batch is in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-02"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`."},"quantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total quantity received into the batch, in the item's stocking unit. When a receipt, inventory increase, or inventory count creates the batch, it is 0 until the document that brings in the stock is committed. For a batch created by a production order, it does not show the quantity received, so use `inStock` instead. Unlike `inStock`, it does not change when stock leaves the batch or comes back on a sales return. Only canceling a receipt, inventory increase, or warehouse transfer that brought stock into the batch lowers it.","examples":["400"]},"inStock":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the batch currently in stock, in the item's stocking unit. It counts all of the batch's stock, whatever its `batchStatus`, so quarantined, expired, and disposed stock are included. To take stock out, create and commit a document that moves it out, such as an inventory decrease.","examples":["260"]},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the batch expires. Format: YYYY-MM-DD.","examples":["2027-03-31"]},"manufactureDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the manufacturer made the batch. Format: YYYY-MM-DD."},"bestBeforeDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The best-before date of the batch. Format: YYYY-MM-DD."},"entryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the batch's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase creates the batch, it is the date entered for the batch on that document, or the document's date when none was entered. When a warehouse transfer creates the batch, it is the `entryDate` of the batch in the sending warehouse. Each later receipt or inventory increase for the batch sets a new date. The age of all the batch's stock is then counted from the new date, including stock received earlier. A warehouse transfer that adds stock to an existing batch does not change the date."},"batchStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the batch. Changing the status does not change the batch's `quantity`, `inStock`, or `cost`. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'.","examples":["ACTIVE"]},"temperatureBreach":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the batch has been outside its storage temperature range."},"qcStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The quality-control status of the batch, as free text."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the batch is active.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the batch record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the batch record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"getReasonCodeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the reason code.","examples":["7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"]},"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. It is unique within the tenant.","examples":["DAMAGE"]},"description":{"type":"string","description":"A free-form description of what the reason code means. Absent when none was given.","examples":["Stock damaged in the warehouse"]},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. When false, existing documents keep it and new ones cannot select it.","examples":[true]},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect.","examples":[true]},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The document types this reason code may be selected on, in a stable order. An empty array when it is linked to none. It is not returned by the collection GET inventory/reason-codes.","examples":[["InventoryDecrease","SalesReturn"]]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the reason code record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change it.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","code","documentTypes"]},"bulkCreateInventoryIncreasesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase."},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The short code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'."},"notes":{"type":"string","description":"Free text on the inventory increase."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth, and unitPrice is calculated from it as lineValue divided by quantity. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"description":"The created inventory increases, in input order. Match them to inputs by position.","examples":[[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateInventoryIncreasesInput":{"type":"object","properties":{"increases":{"type":"array","items":{"type":"object","properties":{"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase, and every line is added to it. Required. See id on GET inventory/warehouses/:id."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it to use the warehouse's owning entity. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. Defaults to today. It sets the posting period. Use format YYYY-MM-DD."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code explaining the adjustment. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the inventory increase."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency. Greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the batch."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Use format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch, in the line's unit. The batch quantities of a line must add up to the line's quantity."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches making up this line's quantity. Required for a batch-tracked item, and the quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false},"description":"The serialized units, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity lands in. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number not on the line is rejected."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity","unitPrice"]},"description":"The lines of the inventory increase. At least one is required."}},"additionalProperties":false,"required":["locationId","lines"]},"description":"The inventory increases to create. At least one, and each is exactly what POST inventory/inventory-increases takes.","examples":[[{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"August cycle count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]]}},"additionalProperties":false,"required":["increases"]},"warehousesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the warehouse.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. It is unique within the tenant.","examples":["WH-01"]},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'.","examples":["Rotterdam Distribution Centre"]},"inventoryLocationType":{"type":"string","description":"The kind of location.","examples":["WAREHOUSE"]},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. When false, existing stock and history keep pointing at it and new documents cannot select it.","examples":[true]},"isPrimaryReceiving":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this is the entity's primary receiving warehouse. Open purchase-order on-order quantity for the entity is attributed here for replenishment. At most one warehouse per entity is the primary receiving warehouse.","examples":[true]},"addressLine1":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The first address line: street number and name, or PO box. Absent when unset.","examples":["Waalhaven 12"]},"addressLine2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The second address line: apartment, suite, unit, building or floor. Absent when unset."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The city or locality. Absent when unset.","examples":["Rotterdam"]},"stateProvince":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The state, province or region. Absent when unset."},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The postal or ZIP code. Absent when unset.","examples":["3087 BM"]},"countryCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. Absent when unset.","examples":["NL"]},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-text business region grouping, independent of country and state. Absent when unset.","examples":["Benelux"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the legal entity that owns this warehouse. See id on GET base/entities.","examples":["81e8beb1-1415-4012-9012-8138580f43dc"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that owns this warehouse.","examples":["Acme GmbH"]},"warehouseTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Absent when the warehouse allows every type. There is no endpoint for it."},"warehouseTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse type. Absent when the warehouse allows every document type."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the warehouse record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"searchItemCategoriesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item category."},"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not unique: two categories can share a name, so use id to address one."},"description":{"type":"string","description":"A free-form description of what the category covers. Absent when none was set."},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. When false the category is retired: existing items keep it and new ones cannot be assigned to it."},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"parentId":{"type":"string","description":"The identifier of the category this one sits under. Absent for a top-level category. See id on GET inventory/item-categories/:id."}},"additionalProperties":false,"required":["id","name"]},"description":"The item categories on this page, ordered by id. The same schema as GET inventory/item-categories/:id. An empty array when nothing matches.","examples":[[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","name":"Hardware","description":"Fasteners, fittings and tooling","active":true,"idealTurnoverRatio":"6.50","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchItemCategoriesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Limits results to item categories with this exact name, for example 'Hardware'. Names are not unique, so this can match several."},"active":{"type":"boolean","description":"Limits results to categories that can be chosen on new items (true) or to retired ones (false). Omit to match both."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to categories changed at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. Omit to return all item categories.","examples":[{"active":true,"modifiedSince":"2026-08-01T00:00:00.000Z"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of item categories per page. Defaults to 50, capped at 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkDeleteReceiptsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted receipts, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteReceiptsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the receipts to delete. If any is missing or is not in draft status, none are deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"getAccountDeterminationRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique.","examples":["Finished goods — receipts"]},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used. A rule with no `priority` counts as 0.","examples":[10]},"isActive":{"type":"boolean","description":"Whether the rule is active.","examples":[true]},"matching":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"The unique identifier of the accounting book this rule applies to. Format: UUID. Absent only on some rules created before a book was required. Set a book on such a rule with PATCH inventory/account-determination-rules/:id (updateAccountDeterminationRule). See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"type":"string","description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' means every transaction type. A rule stored with no transaction type is returned as 'DEFAULT'. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"required":["entityId"],"description":"The dimensions this rule applies to. When the item type, item category, location, or transaction type is absent, the rule applies to every value of it.","examples":[{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"}]},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"type":"string","description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"type":"string","description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"type":"string","description":"The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"type":"string","description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"type":"string","description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"type":"string","description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"type":"string","description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"type":"string","description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"type":"string","description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"type":"string","description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"type":"string","description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"type":"string","description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"type":"string","description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"type":"string","description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"type":"string","description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"type":"string","description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches. Only the accounts set on the rule are included in the response.","examples":[{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}]},"reasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the override. Format: UUID."},"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the twenty accounts can be overridden."}},"additionalProperties":false,"required":["id","reasonCodeId","accountId","parentAccountType"]},"description":"The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by `parentAccountType`. An inventory increase or decrease created by manufacturing that has its own offset account uses that account instead of an override. An empty array when the rule has none.","examples":[[]]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the rule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Requests that change only the reason-code overrides do not update this field.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","ruleName","matching","accounts","reasonCodeOverrides"]},"updateAccountDeterminationRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]}},"additionalProperties":false,"required":["id"]},"updateAccountDeterminationRuleInput":{"type":"object","properties":{"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique."},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used."},"isActive":{"type":"boolean","description":"Whether the rule is active."},"matching":{"type":"object","properties":{"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the accounting book this rule applies to. Format: UUID. To move the rule to another book, send that book's identifier. Every rule must have a book. See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"anyOf":[{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"]},{"type":"null"}],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' applies to every transaction type, the same as sending null. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"description":"Changes to the dimensions this rule applies to. Send null for the item type, item category, location, or transaction type to make the rule apply to every value of it."},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches.","examples":[{"cogsAccountId":"9a4d18e2-70bc-4f51-8d36-2e0b74f9a3c1"}]},"createReasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the twenty accounts can be overridden."}},"additionalProperties":false,"required":["reasonCodeId","accountId","parentAccountType"]},"description":"The reason-code overrides to add to the rule. Each combination of `reasonCodeId` and `parentAccountType` can appear only once on a rule."},"updateReasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the override you want to change. Format: UUID. See `reasonCodeOverrides[].id` on GET inventory/account-determination-rules/:id (getAccountDeterminationRule)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the twenty accounts can be overridden."}},"additionalProperties":false,"required":["id"]},"description":"The reason-code overrides to change. Each item names an existing override by its `id` and can change its `accountId` or `parentAccountType`. To change an override's `reasonCodeId`, delete the override and add a new one."},"deleteReasonCodeOverrides":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the reason-code overrides to delete. Format: UUID. Deletions happen before the additions in `createReasonCodeOverrides`, so one request can replace an override with a new one for the same `reasonCodeId` and `parentAccountType`."}},"additionalProperties":false},"createReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created.","examples":["GR-2291"]},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The legal entity the receipt belongs to.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The vendor the goods came from.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of that vendor.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number.","examples":["DN-77120"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency.","examples":["725.00"]},"notes":{"type":"string","description":"Free text on the receipt.","examples":["Received at the back dock"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createReceiptInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The vendor the goods came from. Required.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"entityId":{"type":"string","description":"The legal entity. Omit it and the first line's warehouse decides it, but a receipt of only Service or Expense lines has no warehouse, so send it for those. Every line's locationId must belong to this entity or the request fails with LOCATION_ENTITY_MISMATCH."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Use format YYYY-MM-DD. Defaults to today.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"currency":{"type":"string","description":"The currency for every amount on the receipt. Format ISO 4217, for example 'EUR'. Defaults to the vendor's or the entity's, as the platform resolves it.","examples":["EUR"]},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number.","examples":["DN-77120"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment. Free text: no format check, and no lookup against a carrier."},"notes":{"type":"string","description":"Free text on the document.","examples":["Received at the back dock"]},"lines":{"type":"array","items":{"type":"object","properties":{"lineType":{"enum":["Inventory","Service","Expense"],"description":"What this line receives. Defaults to Inventory. An Inventory line needs itemId, unitId, locationId and quantity, because it moves stock into a warehouse. A Service or Expense line needs serviceDescription and an amount, and has no item or warehouse. A line with a description and no item is taken as a Service line."},"itemId":{"type":"string","description":"The item received. Required on an Inventory line, and not used on a Service or Expense line."},"serviceDescription":{"type":"string","description":"What was bought. Required on a Service or Expense line, and not used on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods go into. Required on an Inventory line, and it must belong to the receipt's legal entity."},"unitId":{"type":"string","description":"The unit the quantity is counted in. Required on an Inventory line."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in that unit. Required on an Inventory line, and greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency. Leave it out to have it calculated as quantity × unitPrice, rounded to the currency's decimals. When quantity and unitPrice are also given it must equal that, once rounded the same way, or the request fails with LINE_TOTAL_MISMATCH. On a Service or Expense line without a quantity or unitPrice it is taken as given, and such a line needs this or a unitPrice."},"expenseAccountId":{"type":"string","description":"The general ledger account to charge. Required on a Service or Expense line, or the request fails with INCOMPLETE_LINE. Not used on an Inventory line."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line receives against, as its id under lines on GET accounting/purchase-orders/:id. Its numeric id in string form is also accepted. The line type is set from it."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."}},"additionalProperties":false},"description":"The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods go into."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries."}},"additionalProperties":false},"description":"The lines of the receipt. At least one is required.","examples":[[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]]}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"updateWarehouseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the warehouse.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]}},"additionalProperties":false,"required":["id"]},"updateWarehouseInput":{"type":"object","properties":{"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. It must stay unique within the tenant. Reusing the warehouse's own current code is not a collision."},"name":{"type":"string","description":"The site name of the warehouse."},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. See id on GET base/entities. A warehouse that already has inventory transactions cannot be moved to another entity: the platform refuses it and the call fails with a validation error."},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location."},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. Set it to false to retire the warehouse without deleting it: its stock, transactions and bins keep pointing at it and new documents cannot select it.","examples":[false]},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse. At most one warehouse per entity is meant to be the primary receiving warehouse. It is not enforced."},"warehouseTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Pass null to clear it, which lets the warehouse allow every document type again. An unknown identifier fails the call with WAREHOUSE_TYPE_NOT_FOUND. There is no endpoint for it."},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box."},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"postalCode":{"type":"string","description":"The postal or ZIP code."},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. It is not validated against the ISO list."},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state."}},"additionalProperties":false},"bulkCreateLandedCostItemsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created landed cost item. Format: UUID."}},"additionalProperties":false,"required":["id"]},"description":"The created landed cost items, in the order you sent them.","examples":[[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"},{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateLandedCostItemsInput":{"type":"object","properties":{"landedCostItems":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. See `id` on GET inventory/items/:id (getItem)."},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. See `id` on GET accounting/accounts/:id (getAccount)."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type."},"active":{"type":"boolean","description":"Whether the landed cost item is active. Defaults to true."}},"additionalProperties":false,"required":["allocationMode"]},"description":"The landed cost items to create. Each landed cost item needs an `itemId`, an `accountId`, or both.","examples":[[{"itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","allocationMode":"Weight"},{"accountId":"7e21b508-4a93-4c67-b0d5-19f6a3e84c72","allocationMode":"LineTotal"}]]}},"additionalProperties":false,"required":["landedCostItems"]},"inventoryTransactionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory transaction. Format: UUID.","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"unitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit of measure the inventory transaction was recorded in. Format: UUID. For receipts, shipments, and warehouse transfers, it is the unit on the document line. For inventory increases, inventory decreases, and inventory revaluations, it is the item's stocking unit. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure).","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the unit of measure in `unitId`.","examples":["EA"]},"unitName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the unit of measure in `unitId`.","examples":["Each"]},"transactionDate":{"type":"string","format":"date","description":"The date the stock came in or went out, or its value changed. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the item's stocking unit. It is 0 when the inventory transaction takes stock out or changes only the value of the stock.","examples":["500.00"]},"outQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that this inventory transaction took out of stock, in the item's stocking unit. It is 0 when the inventory transaction brings stock in or changes only the value of the stock.","examples":["0.00"]},"unitInQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that this inventory transaction brought into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit.","examples":["500.00"]},"unitOutQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that this inventory transaction took out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"unitCost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost of one unit of the item, in the item's stocking unit and in the currency named by `currency`. When stock goes out, it is the item's cost at that time, from its valuation method.","examples":["3.75"]},"totalCost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total cost of the stock that this inventory transaction brought in or took out, in the currency named by `currency`. It is positive whichever way the stock moved, so use `inQuantity` and `outQuantity` to tell the direction. On an inventory revaluation, it is the change in the value of the stock: a positive amount raises the value and a negative amount lowers it.","examples":["1875.00"]},"salesAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total selling price of the stock on the shipment line, in the currency named by `currency`. It is the line's unit price multiplied by the quantity. Only inventory transactions created by shipments have it."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency that `unitCost`, `totalCost`, and `salesAmount` are in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of document line the inventory transaction came from. Possible values: 'IMInventorySalesOrderLine', 'IMInventorySalesDeliveryLine', 'IMSalesOrderLine', 'IMInventoryPurchaseReturnLine', 'IMInventorySalesReturnLine', 'IMWarehouseTransferLine', 'IMInventoryDecreaseLine', 'IMInventoryIncreaseLine', 'IMInventoryRevaluationLine', 'IMInventoryTransferLine', 'IMInventoryAdjustmentLine', 'IMInventoryCountLine', 'IMInventoryPutAwayTask', 'IMInventoryPurchaseReturnReversal', 'PurchaseOrderLine', 'IMLandedCostAllocationLine', 'SalesOrderProductItem', 'IMWarehouseTransferOrderLine', 'VendorBillItemBase', 'InvPurchaseDeliveryLine'.","examples":["InvPurchaseDeliveryLine"]},"isReturn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the inventory transaction comes from a sales return or a purchase return, including the inventory transactions created when a return is canceled.","examples":[false]},"isPriceDiff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the inventory transaction changes only the value of stock, without moving any, such as an inventory revaluation or a landed cost.","examples":[false]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the item, warehouse, or unit of measure do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false},"searchShipmentCarriersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment carrier."},"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. Names are not unique, so use id to address one carrier."},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments. Absent on carriers created before the active flag existed."},"vendorId":{"type":"string","description":"The unique identifier for the vendor this carrier bills through. Absent when the carrier has no vendor. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this carrier bills through. Absent when the carrier has no vendor. It is resolved from the vendor at read time and is not stored on the carrier."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the carrier record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name"]},"description":"The shipment carriers on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332","name":"DHL Express","active":true,"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47","vendorName":"DHL International GmbH","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more shipment carriers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchShipmentCarriersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Limits results to carriers with this name. The match is exact. Names are not unique, so this can match several carriers."},"active":{"type":"boolean","description":"Limits results to carriers that can be selected on new shipments when true, and to retired carriers when false."},"vendorId":{"type":"string","description":"Limits results to carriers linked to this vendor. An identifier matching no vendor returns an empty page. See id on GET accounting/vendors/:id."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to carriers changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A shipment carrier must match every filter you send. Send an empty object to return all shipment carriers.","examples":[{"active":true,"modifiedSince":"2026-08-01T00:00:00.000Z"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of shipment carriers per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"itemTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item type.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the item type, for example 'Stocked good'. Two item types cannot share a name.","examples":["Stocked good"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the item type.","examples":["Physical goods held in a warehouse"]},"procurable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether items of this type can appear on purchase documents.","examples":[true]},"stockable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether items of this type hold stock.","examples":[true]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item type can be chosen for new items.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the item type was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the item type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"deleteWarehouseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted warehouse.","examples":["b5390f6a-1c72-4e84-9a03-8f2d61c74e59"]},"locationCode":{"type":"string","description":"The location code the deleted warehouse held.","examples":["WH-02"]}},"additionalProperties":false,"required":["id","locationCode"]},"deleteInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]}},"additionalProperties":false,"required":["id"]},"searchInventoryLevelsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory level."},"itemId":{"type":"string","description":"The unique identifier for the item this level is for. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item's short code."},"itemName":{"type":"string","description":"The item's name."},"locationId":{"type":"string","description":"The unique identifier for the location this level is at. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The location's short code."},"locationName":{"type":"string","description":"The location's name."},"onHandQuantity":{"type":"string","format":"decimal","description":"The total physical quantity on hand at this location, in the item's stocking unit of measure."},"availableQuantity":{"type":"string","format":"decimal","description":"The quantity free to allocate: onHandQuantity minus allocatedQuantity and reservedQuantity."},"allocatedQuantity":{"type":"string","format":"decimal","description":"The quantity allocated to outbound demand."},"reservedQuantity":{"type":"string","format":"decimal","description":"The quantity reserved."},"inTransitQuantity":{"type":"string","format":"decimal","description":"The quantity in transit to this location."},"damagedQuantity":{"type":"string","format":"decimal","description":"The quantity flagged as damaged."},"qualityHoldQuantity":{"type":"string","format":"decimal","description":"The quantity on quality hold."},"averageCost":{"type":"string","format":"decimal","description":"The moving-average unit cost, in the currency given by currency."},"onHandValue":{"type":"string","format":"decimal","description":"The value of the stock on hand, in the currency given by currency."},"currency":{"type":"string","description":"The currency of averageCost and onHandValue. Format ISO 4217, for example 'EUR'. Absent when the level has no valuation yet."},"lastTransactionTimestamp":{"type":"string","format":"date-time","description":"The date and time a stock movement last touched this level. Format YYYY-MM-DDTHH:mm:ss. Unlike lastModifiedDate, it changes only when stock moves."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory-level record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","itemId","locationId","availableQuantity"]},"description":"The inventory levels that match, ordered by id. An empty array when nothing matches.","examples":[[{"id":"0b6d4c93-71ea-4f28-9c05-83a1e7f6204d","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","onHandQuantity":"1200.00","availableQuantity":"1150.00","allocatedQuantity":"50.00","averageCost":"3.75","onHandValue":"4500.00","currency":"EUR","lastTransactionTimestamp":"2026-08-03T11:15:00","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryLevelsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"itemId":{"type":"string","description":"Limits results to levels for the item with this identifier. An identifier that matches no item returns an empty page. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"Limits results to levels at the location with this identifier. Combine with itemId to identify at most one level. An identifier that matches no location returns an empty page. See id on GET inventory/warehouses/:id."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to levels with lastModifiedDate at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A level must match every filter you send. Omit to return all inventory levels.","examples":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The maximum number of inventory levels to return. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"deleteReasonCodeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted reason code.","examples":["c30b6f18-4a92-4e05-8d73-1b6f95e2043c"]},"code":{"type":"string","description":"The business code the deleted reason code held.","examples":["RECOUNT"]}},"additionalProperties":false,"required":["id","code"]},"searchInventoryRevaluationsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation."},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'."},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'."},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet."},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation."},"lineCount":{"type":"number","description":"How many lines the revaluation has."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation line. Pass it in updateLines or deleteLines on PATCH inventory/inventory-revaluations/:id to change or remove the line."},"itemId":{"type":"string","description":"The unique identifier for the item being revalued. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock this line restates. The same item may be carried at a different cost in each warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates the cost of, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the revaluation's currency. You supply it and the platform checks it rather than deriving it. Read it from GET inventory/inventory-levels."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the revaluation's currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document, in the revaluation's currency. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize, in the revaluation's currency. Moving-average direct cost capitalization only."},"revaluationAmount":{"type":"string","format":"decimal","description":"The value this line moves on the balance sheet, in the revaluation's currency: (newUnitCost - currentUnitCost) x quantity."},"status":{"type":"string","description":"Where the line sits in the platform's own process. This is free text with no fixed set of values."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number."},"batchNumber":{"type":"string","description":"The batch number itself."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number."},"serialNumber":{"type":"string","description":"The serial number itself."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document. Direct cost capitalization on a sold serial only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit, so there must be exactly as many as the quantity says."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the revaluation."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The revaluations on this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"COMMITTED","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor to pass as page.cursor for the next page. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryRevaluationsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The exact document number, for example 'REV-1187'. The match is exact, not a substring."},"documentStatus":{"type":"string","description":"Limits results to revaluations with this status. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'. The match is exact."},"costingValuationType":{"type":"string","description":"Limits results to revaluations of this kind. Possible values: 'revaluation', 'directCostCapitalisation'. The match is exact."},"entityId":{"type":"string","description":"Limits results to revaluations for this legal entity. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to revaluations that have a line for this warehouse. The warehouse is a line field, so the collection endpoint cannot answer this. See id on GET inventory/warehouses/:id."},"itemId":{"type":"string","description":"Limits results to revaluations that have a line for this item. See id on GET inventory/items/:id."},"reasonCodeId":{"type":"string","description":"Limits results to revaluations with this reason code. See id on GET inventory/reason-codes/:id."},"fromDate":{"type":"string","format":"date","description":"The inclusive lower bound on documentDate. Omit for an open-ended start. Use format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"The inclusive upper bound on documentDate. Omit for an open-ended end. Use format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"The inclusive lower bound on lastModifiedDate, the incremental-sync filter, distinct from the documentDate window. Use format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The search criteria, combined with AND. An empty object returns every revaluation, page by page.","examples":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","documentStatus":"COMMITTED"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of revaluations per page. Defaults to 50. The maximum is 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkDeleteUnitOfMeasureGroupsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted unit of measure group."},"name":{"type":"string","description":"The display name the deleted unit of measure group held."}},"additionalProperties":false,"required":["id","name"]},"description":"The deleted unit of measure groups, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteUnitOfMeasureGroupsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the unit of measure groups to delete. Each must already be empty, with no items pointing at it and no conversion lines left. If any identifier matches nothing or any group is still in use, nothing is deleted and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"createPurchaseReturnFromPurchaseOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The purchase return number.","examples":["PRTR-1044"]},"documentStatus":{"type":"string","description":"The status of the purchase return. It is always 'DRAFT' on a created purchase return.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD.","examples":["2026-08-22"]},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It is the warehouse that the purchase order line was received into, taken from a committed receipt for that line. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It is the quantity received on the purchase order line minus the quantity already returned. For a batch-tracked or serialized item, it is no more than the batches or serialized units that are still available to return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It is the purchase order line's price."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the purchase order line this line returns goods from. Format: UUID. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. It is always 'PurchaseOrderLine'."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches chosen for this purchase return line. They come from the batches received on the purchase order line that have not been returned yet."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units chosen for this purchase return line. They come from the units received on the purchase order line that have not been returned yet."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return, one for each purchase order line for an item with a quantity still to return.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","quantity":"30.00","sourceDocumentLineId":"a3e7c915-62d4-4f08-b1a9-7d5c24e8f063","sourceDocumentLineType":"PurchaseOrderLine"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createPurchaseReturnFromPurchaseOrderInput":{"type":"object","properties":{"purchaseOrderId":{"type":"string","description":"The unique identifier of the purchase order to create the purchase return from. Format: UUID. See `id` on GET accounting/purchase-orders/:id (getPurchaseOrder).","examples":["c74b1e08-2a95-4f63-b8d1-6e30f9a25c47"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD. Defaults to today's date in UTC."},"returnType":{"type":"string","description":"The type of the purchase return. Defaults to 'NORMAL'. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Shipping an 'UNINVOICED_CANCELLATION' purchase return fails when a line returns more of its purchase order line than is received, not invoiced, and not already canceled. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]}},"additionalProperties":false,"required":["purchaseOrderId"]},"createSalesOrderOutput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"UUID of the new sales order — what every other sales-order route addresses it by.","examples":["b71c04e9-3a5d-4f28-9106-d8e5fa27c3b1"]}},"additionalProperties":false,"required":["salesOrderId"]},"createSalesOrderInput":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"Send `approved` to have the order approved as soon as it is created. The order is always written as `pendingApproval` first and only then transitioned, so every approval side-effect — invoice-plan generation above all — runs against a complete order. Any other value leaves it pending approval.","examples":["approved"]},"bookDate":{"type":"string","format":"date","description":"Day the order is booked. Defaults to today, and is the date the entity's active invoice policy is resolved for.","examples":["2026-01-15"]},"currency":{"type":"string","description":"ISO 4217 code every price on the order is denominated in — header, lines, tiers and rate-card rows alike.","examples":["EUR"]},"customer":{"$ref":"#/components/schemas/InlineCustomer","description":"A new customer to create alongside the order. Provide exactly one of `customerId` and `customer`. It is created through the same path as the Customer create endpoint, so anything that path rejects fails the whole request and leaves no order behind."},"customerId":{"type":"string","description":"UUID of the existing Customer the order is raised for. Provide exactly one of `customerId` and `customer`; sending both, or neither, is rejected.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]},"dataSource":{"type":"string","description":"The system the order came from, for example 'Salesforce' or 'NetSuite'. Omit it when the order doesn't come from another system.","examples":["Salesforce"]},"effectiveDate":{"type":"string","format":"date","description":"Day the order becomes commercially effective.","examples":["2026-02-01"]},"entityId":{"type":"string","description":"UUID of the legal Entity the order belongs to.","examples":["1c9e5f38-7b04-4a26-8d31-5f60e2ab7c95"]},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the order is kept out of the tax engine, so no tax is calculated for it."},"externalIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdentifier"},"description":"Identifiers the order carries in other systems, upserted by `fieldName`."},"externalizedInvoicing":{"type":"boolean","description":"Whether invoicing for this order is handled in another system. Defaults to false."},"nonSubscriptionProducts":{"type":"array","items":{"$ref":"#/components/schemas/ProductLine"},"description":"One-time product lines, sitting on the order itself rather than under a subscription. Line types that are not subscription-based belong here — putting one under a subscription is rejected with `INVALID_SUBSCRIPTION_PRODUCT`."},"oneTimeDiscountAllocation":{"type":"string","description":"How the one-time discount is spread across the order's invoices: `firstInvoice` puts all of it on the first, `alignToInvoiceFrequency` spreads it over the invoicing schedule, `custom` leaves the allocation to be set by hand.","examples":["firstInvoice"]},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-off discount on the order as a whole, in the order currency. Independent of the per-line discount fields.","examples":["500.00"]},"opportunityId":{"type":"string","description":"Id of the originating opportunity in the CRM, kept as text.","examples":["0065f00000ABCDEfg"]},"opportunityName":{"type":"string","description":"Name of the opportunity the order came out of.","examples":["Contoso — 2026 renewal"]},"paymentTermCode":{"type":"string","description":"The order's payment term, named by its code. Defaults to the term on the entity's invoice policy active at `bookDate`.","examples":["NET30"]},"priceBookId":{"type":"string","description":"UUID of the PriceBook the lines take their list prices from. Defaults to the standard price book.","examples":["72fd1a08-6c39-4e5b-83a0-9d4127be6f5c"]},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order number for this order.","examples":["PO-2026-0042"]},"salesArrangementId":{"type":"string","description":"UUID of an existing SalesArrangement to file the order under. Omit it and a new arrangement is created for the customer in the order currency.","examples":["e30a76b5-c284-4d91-a7f3-2b508c6de194"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the order's service period. Once the lines are built the order takes the earliest line start instead, so this is what governs an order whose lines carry no dates of their own.","examples":["2026-01-01"]},"signDate":{"type":"string","format":"date","description":"Day the order was signed.","examples":["2026-01-10"]},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"},"description":"The recurring part of the order. Each subscription carries its own term and its own product lines."}},"additionalProperties":false,"required":["currency","entityId","serviceStartDate"]},"updateSalesOrderOutput":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"The order's approval status after the update: `draft`, `pendingApproval`, `revise` or `approved`.","examples":["pendingApproval"]},"id":{"type":"string","description":"UUID of the sales order that was updated.","examples":["b71c04e9-3a5d-4f28-9106-d8e5fa27c3b1"]}},"additionalProperties":false,"required":["approvalStatus","id"]},"updateSalesOrderInput":{"type":"object","properties":{"billToAddressId":{"type":"string","description":"UUID of the Address invoices for this order go to. An address that does not exist fails with `INVALID_ADDRESS`. Stays editable after the order is approved.","examples":["5b8c31f6-04ad-472e-9f81-63a0d7e295cb"]},"createProducts":{"type":"array","items":{"type":"object","properties":{"allowance":{"$ref":"#/components/schemas/LineAllowance","description":"The Allowance & Overage terms of a Commit with Overage line. Required for that line type and rejected on any other; omitted fields default from the product catalog."},"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice`, in the order currency. Used when no `unitPrice` is given, and then drives the other two.","examples":["120.00"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice` on a 0–100 scale, so `10` means ten percent. Stored as a 0–1 fraction. The lowest precedence of the three — used only when neither `unitPrice` nor `discountAmount` is given.","examples":["10"]},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"externalUrl":{"type":"string","description":"Deep link to the record in the owning system, shown beside the id.","examples":["https://netsuite.example.com/app/accounting/transactions/salesord.nl?id=10042"]},"fieldName":{"type":"string","description":"Names the ExternalIdentifierConfiguration this id belongs to, as that configuration spells it. It must already be configured for the tenant; an unknown name is rejected. Identifiers are upserted by this name, so sending it again overwrites the stored value.","examples":["netsuiteInternalId"]},"value":{"type":"string","description":"The identifier as the owning system spells it.","examples":["SO-10042"]}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers this line carries in other systems, upserted by `fieldName`."},"invoiceFrequency":{"type":"string","description":"How often the line invoices — an InvoiceFrequency member: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually`, `once`, `custom`, `template`, `milestone`, `allAtOnce` or `termEnd`. Defaults to the product line's own setting.","examples":["monthly"]},"invoiceTiming":{"type":"string","description":"Whether the line invoices `advance` (at the start of the service period) or `arrears` (after it). Defaults from the entity's active invoice policy for this line type.","examples":["advance"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the line invoices on: `anniversary`, `first`, `last` or `specific`. Defaults from the entity's active invoice policy.","examples":["anniversary"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price per unit, in the order currency. Defaults to the list price the order's price book holds for this product line, and is the figure the other pricing fields are reconciled against.","examples":["1200.00"]},"priceModel":{"type":"string","description":"How the line is priced: `flat`, `perUnit`, `tiered`, `volume`, `stairstep` or `rateCard`. Defaults to the product line's own model. `tiered`, `volume` and `stairstep` take their prices from `tiers` and `rateCard` from `rateCardEntries`, so for those the line-level discount fields are not reconciled. `thresholdBased` is rejected: it needs a base line plus a metered usage child, which this endpoint does not build.","examples":["perUnit"]},"pricingTerm":{"type":"string","description":"The period the price is quoted for: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually` or `once`. Defaults to the product line's own term.","examples":["annually"]},"productLineId":{"type":"string","description":"UUID of the ProductLine being added. It settles the product, the line type and the billing rules every omitted field defaults from.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]},"quantity":{"type":"string","format":"decimal","description":"Number of units ordered. Required unless the line takes its quantity from somewhere else: usage-metered line types (PayAsYouGo, Usage, Billable*) meter it from usage records, so for those it must be omitted or 0 (a non-zero value is rejected, matching the Sales Order screen); tier-priced models (`tiered`, `volume`, `stairstep`, `thresholdBased`) derive it from the tier structure, so for those it defaults to zero. Anywhere else, omitting it fails the request.","examples":["10"]},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"UUID of the BillableComponent this row meters. Optional — a row may price a unit of measure without naming a component — but a UUID that does not resolve rejects the whole request.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"conversion":{"type":"string","format":"decimal","description":"Factor converting the billable unit into the reporting unit — 1000 when usage is metered per call but reported per thousand.","examples":["1000"]},"description":{"type":"string","description":"Free-text label for the row, carried through to the stored rate-card entry.","examples":["API calls beyond the included volume"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted rate per `unitOfMeasure`, in the order currency. Honored only while the product line's `enforceListPrice` is false; otherwise the product line's own list price wins.","examples":["0.005"]},"unitOfMeasure":{"type":"string","description":"The unit this row is priced in.","examples":["apiCall"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated rate per `unitOfMeasure`, in the order currency.","examples":["0.004"]}},"additionalProperties":false,"required":["unitOfMeasure","unitPrice"]},"description":"Per-unit rates for a `rateCard`-priced line. Supplying any entry moves pricing onto the rate card, so the line-level discount fields stop being reconciled."},"serviceEndDate":{"type":"string","format":"date","description":"Last day of the line's service period. The order's own service end is the latest across all its lines, and is left open on an evergreen order.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the line's service period. The order's own service start is the earliest across all its lines.","examples":["2026-01-01"]},"subscriptionId":{"type":"string","description":"UUID of a subscription already on this order to hang the line under. Omit it to add the line to the order itself as a one-time line. A subscription that is not on the order fails with `INVALID_SUBSCRIPTION`.","examples":["c8402e17-95bf-4a63-8d20-71ec3f6a0b48"]},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"Name of the value-accounting dimension, as configured for the tenant. Resolved by name, not by id.","examples":["Department"]},"value":{"type":"string","description":"Name of the value within that dimension. The pair must resolve to an existing tag and the dimension must be enabled for sales orders; an unknown pair rejects the whole request.","examples":["Engineering"]}},"additionalProperties":false,"required":["dimension","value"]},"description":"Value-accounting tags to allocate this line by. Requires value-allocation tagging to be enabled for sales orders."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of the tier's quantity range, inclusive.","examples":["0"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price for this tier, in the order currency. Defaults to `unitPrice`, i.e. no discount on the tier.","examples":["15.00"]},"priceModel":{"type":"string","description":"How `unitPrice` applies within the tier: `perUnit` (the default) charges it for every unit in the range, `flat` charges it once for the whole tier.","examples":["perUnit"]},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of the tier's quantity range. Omit it on the last tier to leave the range open-ended.","examples":["100"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price for this tier, in the order currency. Charged per unit in the range when `priceModel` is `perUnit`, or once for the whole tier when it is `flat`.","examples":["12.50"]}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of a `tiered`, `volume` or `stairstep` line. The ranges must be contiguous, and the last tier is left open-ended by omitting its `toQuantity`."},"totalPrice":{"type":"string","format":"decimal","description":"Total for the line, in the order currency. Persisted exactly as supplied rather than recomputed — omit it and the line's own pricing drives the total. Rejected unless omitted or 0 on usage-metered line types (PayAsYouGo, Usage, Billable*), which have no fixed contract value.","examples":["12960.00"]},"unitOfMeasure":{"type":"string","description":"The unit the line is priced and metered in. Defaults to the product line's own unit.","examples":["seat"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price per unit, in the order currency. The highest precedence of the three pricing inputs — supply it and `discountAmount` and `discountPercentage` are recomputed from it (discountAmount = listPrice − unitPrice).","examples":["1080.00"]}},"additionalProperties":false,"required":["productLineId"]},"description":"Product lines to add to the order. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`."},"createSubscriptions":{"type":"array","items":{"type":"object","properties":{"autoRenew":{"type":"boolean","description":"Whether the subscription renews itself at the end of its term."},"products":{"type":"array","items":{"$ref":"#/components/schemas/ProductLine"},"description":"The recurring product lines of the new subscription. Every one must be a subscription-based product line, or the request fails with `INVALID_SUBSCRIPTION_PRODUCT`."},"serviceEndDate":{"type":"string","format":"date","description":"Last day the subscription is in service. Omit it on an evergreen subscription.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day the subscription is in service.","examples":["2026-01-01"]},"term":{"type":"string","format":"decimal","description":"Intended length of a `termed` subscription in months. What actually bounds the subscription is `serviceStartDate` and `serviceEndDate`, so supply the end date to fix when it ends.","examples":["12"]},"termType":{"type":"string","description":"`termed` for a subscription of fixed length, `evergreen` for an open-ended one that keeps renewing.","examples":["termed"]}},"additionalProperties":false,"required":["products","serviceStartDate","termType"]},"description":"New subscriptions to add to the order, each bringing its own product lines. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`."},"deleteProducts":{"type":"array","items":{"type":"string"},"description":"UUIDs of product lines to remove from the order. Each must belong to it, or the request fails with `INVALID_LINE`. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`."},"effectiveDate":{"type":"string","format":"date","description":"Day the order becomes commercially effective. Stays editable after the order is approved.","examples":["2026-02-01"]},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the order is kept out of the tax engine, so no tax is calculated for it. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`."},"oneTimeDiscountAllocation":{"type":"string","description":"How the one-time discount is spread across the order's invoices: `firstInvoice` puts all of it on the first, `alignToInvoiceFrequency` spreads it over the invoicing schedule, `custom` leaves the allocation to be set by hand. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`.","examples":["firstInvoice"]},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-off discount on the order as a whole, in the order currency. Independent of the per-line discount fields. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`.","examples":["500.00"]},"opportunityName":{"type":"string","description":"Name of the opportunity the order came out of. Stays editable after the order is approved.","examples":["Contoso — 2026 renewal"]},"paymentTermCode":{"type":"string","description":"The order's payment term, named by its code. Stays editable after the order is approved.","examples":["NET30"]},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order number for this order. Stays editable after the order is approved.","examples":["PO-2026-0042"]},"serviceEndDate":{"type":"string","format":"date","description":"Last day of the order's service period. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the order's service period. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`.","examples":["2026-01-01"]},"signDate":{"type":"string","format":"date","description":"Day the order was signed. Stays editable after the order is approved.","examples":["2026-01-10"]},"soldToAddressId":{"type":"string","description":"UUID of the Address of the contracting party. An address that does not exist fails with `INVALID_ADDRESS`. Stays editable after the order is approved.","examples":["5b8c31f6-04ad-472e-9f81-63a0d7e295cb"]},"updateProducts":{"type":"array","items":{"type":"object","properties":{"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice`, in the order currency. This endpoint has no `unitPrice` field, so the discount is what drives it: unitPrice = listPrice − discountAmount. Takes precedence over `discountPercentage`.","examples":["120.00"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice` on a 0–100 scale, so `10` means ten percent. Stored as a 0–1 fraction. Used only when `discountAmount` is absent.","examples":["10"]},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"externalUrl":{"type":"string","description":"Deep link to the record in the owning system, shown beside the id.","examples":["https://netsuite.example.com/app/accounting/transactions/salesord.nl?id=10042"]},"fieldName":{"type":"string","description":"Names the ExternalIdentifierConfiguration this id belongs to, as that configuration spells it. It must already be configured for the tenant; an unknown name is rejected. Identifiers are upserted by this name, so sending it again overwrites the stored value.","examples":["netsuiteInternalId"]},"value":{"type":"string","description":"The identifier as the owning system spells it.","examples":["SO-10042"]}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers to set on the line, upserted by `fieldName`. Names not listed are left as they are — there is no way to remove one."},"invoiceFrequency":{"type":"string","description":"New invoicing frequency for the line — an InvoiceFrequency member: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually`, `once`, `custom`, `template`, `milestone`, `allAtOnce` or `termEnd`. Omit it to leave the frequency as it stands.","examples":["monthly"]},"invoiceTiming":{"type":"string","description":"Whether the line invoices `advance` (at the start of the service period) or `arrears` (after it). Omit it to leave the timing as it stands.","examples":["advance"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the line invoices on: `anniversary`, `first`, `last` or `specific`. Omit it to leave the day as it stands.","examples":["anniversary"]},"listPrice":{"type":"string","format":"decimal","description":"New undiscounted price per unit, in the order currency. Changing it on its own still re-reconciles the line: the existing discount amount is held fixed and `unitPrice` and `discountPercentage` are re-derived against the new list price.","examples":["1200.00"]},"quantity":{"type":"string","format":"decimal","description":"New number of units for the line. Omit it to leave the quantity as it stands. Usage-metered line types (PayAsYouGo, Usage, Billable*) meter it from usage records, so for those only 0 is accepted; a non-zero value is rejected, matching the Sales Order screen.","examples":["10"]},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"UUID of the BillableComponent this row meters. Optional — a row may price a unit of measure without naming a component — but a UUID that does not resolve rejects the whole request.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"conversion":{"type":"string","format":"decimal","description":"Factor converting the billable unit into the reporting unit — 1000 when usage is metered per call but reported per thousand.","examples":["1000"]},"description":{"type":"string","description":"Free-text label for the row, carried through to the stored rate-card entry.","examples":["API calls beyond the included volume"]},"id":{"type":"string","description":"UUID of a rate-card row already on this line, to change it in place. Leave it out to add a new row. An id that is not on the line fails the request and nothing is applied.","examples":["3f7b9a52-0c1d-48e6-b934-a5d720e8146f"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted rate per `unitOfMeasure`, in the order currency. Honored only while the product line's `enforceListPrice` is false; otherwise the product line's own list price wins.","examples":["0.005"]},"unitOfMeasure":{"type":"string","description":"The unit this row is priced in.","examples":["apiCall"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated rate per `unitOfMeasure`, in the order currency.","examples":["0.004"]}},"additionalProperties":false,"required":["unitOfMeasure","unitPrice"]},"description":"Replaces the line's rate-card rows: a row carrying an `id` is updated, one without is added, and any existing row whose id is not in the list is deleted. Omit the field entirely to leave the line's rows untouched."},"salesOrderProductLineId":{"type":"string","description":"UUID of the order's product line to change. It must belong to this order, or the request fails with `INVALID_LINE`.","examples":["a05e7d13-8f62-4b90-bc47-1e63d0592a8f"]},"serviceEndDate":{"type":"string","format":"date","description":"New last day of the line's service period.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"New first day of the line's service period.","examples":["2026-01-01"]},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"Name of the value-accounting dimension, as configured for the tenant. Resolved by name, not by id.","examples":["Department"]},"value":{"type":"string","description":"Name of the value within that dimension. The pair must resolve to an existing tag and the dimension must be enabled for sales orders; an unknown pair rejects the whole request.","examples":["Engineering"]}},"additionalProperties":false,"required":["dimension","value"]},"description":"Replaces the line's value-accounting tags wholesale. Send `[]` to clear them; omit the field to leave them untouched. Lines that share one product (ramp deals) share their tags, so all of them must be sent the same set. Stays editable after the order is approved."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of the tier's quantity range, inclusive.","examples":["0"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price for this tier, in the order currency. Defaults to `unitPrice`, i.e. no discount on the tier.","examples":["15.00"]},"priceModel":{"type":"string","description":"How `unitPrice` applies within the tier: `perUnit` (the default) charges it for every unit in the range, `flat` charges it once for the whole tier.","examples":["perUnit"]},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of the tier's quantity range. Omit it on the last tier to leave the range open-ended.","examples":["100"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price for this tier, in the order currency. Charged per unit in the range when `priceModel` is `perUnit`, or once for the whole tier when it is `flat`.","examples":["12.50"]}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"Replaces the line's pricing tiers wholesale. Omit the field to leave them untouched."},"totalPrice":{"type":"string","format":"decimal","description":"New total for the line, in the order currency. Persisted exactly as supplied rather than recomputed. Rejected unless 0 on usage-metered line types (PayAsYouGo, Usage, Billable*), which have no fixed contract value.","examples":["12960.00"]}},"additionalProperties":false,"required":["salesOrderProductLineId"]},"description":"Changes to product lines already on the order, each matched by its `salesOrderProductLineId`. Fields left out of an entry keep their current values. Once the order is approved an entry may carry only `salesOrderProductLineId` and `tags`; any other field then fails with `APPROVED_FIELD_LOCKED`."}},"additionalProperties":false},"accounting_invoices_createdPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"accounting_invoices_updatedPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"bulkCreateInventoryDecreasesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease."},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse location."},"locationName":{"type":"string","description":"The display name of that warehouse location."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The short code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'."},"notes":{"type":"string","description":"Free text on the inventory decrease."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"description":"The created inventory decreases, in input order. Match them to inputs by position.","examples":[[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateInventoryDecreasesInput":{"type":"object","properties":{"decreases":{"type":"array","items":{"type":"object","properties":{"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line comes out of it. Required. See id on GET inventory/warehouses/:id."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it to use the location's owning entity. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period. Defaults to today. Use format YYYY-MM-DD."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code explaining the adjustment. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the inventory decrease."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to remove, in that unit. A positive number greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency. Optional: omit it to value the stock at the cost it already has, which is what a write-off ordinarily wants. A supplied value must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch being removed. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the document's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to remove, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches to take the quantity from. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Every batch named must already exist for the item, since a decrease removes lots and does not create them."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit being removed. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the document's warehouse. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The units to remove, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Every unit named must already exist."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the quantity from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number the line does not have is rejected rather than reinterpreted."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity comes out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. At least one is required."}},"additionalProperties":false,"required":["locationId","lines"]},"description":"The inventory decreases to create. At least one, and each is exactly what POST inventory/inventory-decreases takes.","examples":[[{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Forklift damage, aisle 4","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]]}},"additionalProperties":false,"required":["decreases"]},"shipPurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentStatus":{"type":"string","description":"The status of the purchase return after the shipment. It is 'COMMITTED'.","examples":["COMMITTED"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings about the shipment. Empty when there are no warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"shipPurchaseReturnInput":{"type":"object","properties":{"shippedDate":{"type":"string","format":"date","description":"The date the goods left for the vendor. Format: YYYY-MM-DD. Defaults to today.","examples":["2026-08-21"]}},"additionalProperties":false},"readItemCategoryTreeOutput":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item category."},"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not unique: two categories can share a name, so use id to address one."},"description":{"type":"string","description":"A free-form description of what the category covers. Absent when none was set."},"parentId":{"type":"string","description":"The identifier of the category this one sits under. Absent for a top-level category. See id on GET inventory/item-categories/:id."},"level":{"type":"number","description":"The depth in the tree: 0 for a top-level category, 1 for its children, and so on, up to 5."},"path":{"type":"array","items":{"type":"string"},"description":"The ancestor names from the root down, ending with this category's own name. A root's path is its own name alone."},"hasChildren":{"type":"boolean","description":"Whether any category sits beneath this one."}},"additionalProperties":false,"required":["id","name","level","path","hasChildren"]},"description":"Every item category, each with its position in the tree, ordered by name.","examples":[[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","name":"Hardware","description":"Fasteners, fittings and tooling","level":0,"path":["Hardware"],"hasChildren":true},{"id":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8","name":"Servers","parentId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","level":1,"path":["Hardware","Servers"],"hasChildren":true},{"id":"9d61b0af-3c58-4e17-b942-06ea8c73f215","name":"Rack","parentId":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8","level":2,"path":["Hardware","Servers","Rack"],"hasChildren":false}]]}},"additionalProperties":false,"required":["data"]},"getUnitOfMeasureGroupOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure group.","examples":["2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"]},"name":{"type":"string","description":"The display name of the unit of measure group. Names are not unique.","examples":["Packaging"]},"description":{"type":"string","description":"A free-form description of what the group covers. Absent when none was given.","examples":["Eaches, boxes and pallets"]},"baseUnitOfMeasureId":{"type":"string","description":"The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Absent when the group has no lines. See id on GET inventory/unit-of-measures/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"baseUnitCode":{"type":"string","description":"The code of the base unit of measure. Absent when the group has no lines.","examples":["EA"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the conversion line. This is what updateLines and deleteLines address on PATCH inventory/unit-of-measure-groups/:id, not the unit."},"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit of measure."},"unitName":{"type":"string","description":"The display name of that unit of measure."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It is always greater than zero, and 1 on the base unit's own line."},"isBaseUnit":{"type":"boolean","description":"Whether this line is for the group's own base unit of measure. Exactly one line has it, and its conversionFactor is 1."}},"additionalProperties":false,"required":["id","unitOfMeasureId","unitCode","unitName","conversionFactor","isBaseUnit"]},"description":"The group's conversion lines, ordered by line id. An empty array when the group has none.","examples":[[{"id":"9f1b60d4-27ac-4e53-b8f1-05d3e79a2c68","unitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","conversionFactor":"1.00","isBaseUnit":true},{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"BOX","unitName":"Box","conversionFactor":"12.00","isBaseUnit":false}]]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the unit of measure group or its conversion lines last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","name","lines"]},"createInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned.","examples":["DEC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse location.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse location.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory decrease.","examples":["August cycle count"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"createInventoryDecreaseInput":{"type":"object","properties":{"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line comes out of it. Required. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it to use the location's owning entity. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code explaining the adjustment. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"notes":{"type":"string","description":"Free text on the inventory decrease.","examples":["Forklift damage, aisle 4"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to remove, in that unit. A positive number greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency. Optional: omit it to value the stock at the cost it already has, which is what a write-off ordinarily wants. A supplied value must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch being removed. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the document's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to remove, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches to take the quantity from. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Every batch named must already exist for the item, since a decrease removes lots and does not create them."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit being removed. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the document's warehouse. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The units to remove, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Every unit named must already exist."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the quantity from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number the line does not have is rejected rather than reinterpreted."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity comes out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. At least one is required.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["locationId","lines"]},"serialTransactionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial transaction. Format: UUID.","examples":["b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92"]},"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit this transaction is for. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber).","examples":["7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537"]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity. Example: 'SN-000412'.","examples":["SN-000412"]},"manufacturerSerialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The manufacturer's serial number. It shows the unit's current value, not the value at the time of the serial transaction.","examples":["ACME-77-000412"]},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the unit expires. It shows the unit's current value, not the value at the time of the serial transaction. Format: YYYY-MM-DD.","examples":["2029-05-31"]},"entryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the unit's age is counted from. Format: YYYY-MM-DD. It is the unit's current `entryDate`, not the date at the time of this serial transaction.","examples":["2026-08-03"]},"isSold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the unit has been sold. It shows the unit's current value, not the value at the time of the serial transaction. A unit that was sold and then returned has the value false.","examples":[false]},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the inventory transaction this serial transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction).","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["LAPTOP-14"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`.","examples":["14-inch laptop"]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"transactionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the inventory transaction this serial transaction belongs to. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the unit that came into stock. It is 1 when the unit came in, and 0 when only the unit's cost changed.","examples":["1.00"]},"outQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the unit that went out of stock. It is 1 when the unit went out."},"cost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost of the unit, in the currency named by `currency`. When the unit comes in, it is the cost the unit was received at. When the unit goes out, it is the unit's cost at that time. On an inventory revaluation, it is the unit's new cost.","examples":["742.50"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency that `cost` is in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of document line the inventory transaction came from. Possible values: 'IMInventorySalesOrderLine', 'IMInventorySalesDeliveryLine', 'IMSalesOrderLine', 'IMInventoryPurchaseReturnLine', 'IMInventorySalesReturnLine', 'IMWarehouseTransferLine', 'IMInventoryDecreaseLine', 'IMInventoryIncreaseLine', 'IMInventoryRevaluationLine', 'IMInventoryTransferLine', 'IMInventoryAdjustmentLine', 'IMInventoryCountLine', 'IMInventoryPutAwayTask', 'IMInventoryPurchaseReturnReversal', 'PurchaseOrderLine', 'IMLandedCostAllocationLine', 'SalesOrderProductItem', 'IMWarehouseTransferOrderLine', 'VendorBillItemBase', 'InvPurchaseDeliveryLine'.","examples":["InvPurchaseDeliveryLine"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the serial transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the unit itself, such as its `isSold` or `entryDate`, do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false},"bulkCreateSalesReturnsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you."},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"businessPartnerName":{"type":"string","description":"The name of that customer."},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line."},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'."},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back."},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency."},"notes":{"type":"string","description":"Free text on the document."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The created returns, in input order. Match them to inputs by index.","examples":[[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateSalesReturnsInput":{"type":"object","properties":{"returns":{"type":"array","items":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Required, a return always comes from one. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it and the first line's warehouse decides it. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Defaults to today. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency for every amount on the return. Format ISO 4217, for example 'EUR'. Defaults to the legal entity's functional currency. Set it when the sale was in another."},"referenceNumber":{"type":"string","description":"The customer's own reference, for example an RMA number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back."},"returnType":{"type":"string","description":"How the business classifies the return."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency."},"notes":{"type":"string","description":"Free text on the document."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency. Omit it to take the price from the sale."},"condition":{"enum":["NEW","GOOD","USED","OPENED","DAMAGED","DEFECTIVE","EXPIRED","REFURBISHED"],"description":"The condition the goods are expected in. The inspection may find otherwise and restates it."},"disposition":{"enum":["RETURN_TO_STOCK","RETURN_TO_VENDOR","SCRAP","DONATE","REPAIR","REWORK","CREDIT_ONLY"],"description":"What you intend to do with the goods. The inspection may change it."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code. See id on GET inventory/reason-codes/:id."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return follows a delivery. It is a line's id on GET inventory/shipments/:id. Naming it lets the commit value the return from the original shipment cost."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch coming back, as batchNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line returns to. Given beside batchNumberId, it must be that batch's own number."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches coming back on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. On PATCH inventory/sales-returns/:id this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit coming back, as serialNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line returns to. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units coming back, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. On PATCH inventory/sales-returns/:id this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry may name a batchNumber or serialNumber of its own line. On PATCH inventory/sales-returns/:id this replaces the line's bin entries."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines of this return. At least one is required."}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"description":"The returns to create. At least one, each exactly what POST inventory/sales-returns takes.","examples":[[{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-18","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","notes":"Customer reports transit damage","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]}]]}},"additionalProperties":false,"required":["returns"]},"batchTransactionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch transaction. Format: UUID.","examples":["6d2b8e17-4f90-4c53-a821-0e7d3b95c46f"]},"batchNumberId":{"type":"string","description":"The unique identifier of the batch this transaction is for. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber).","examples":["9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9"]},"batchNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse. Example: 'LOT-2026-08-14'.","examples":["LOT-2026-08-14"]},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the batch expires. It shows the batch's current value, not the value at the time of the batch transaction. Format: YYYY-MM-DD.","examples":["2027-08-14"]},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the inventory transaction this batch transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction).","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`.","examples":["Standard widget"]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"unitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit of measure the batch transaction was recorded in. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the unit of measure in `unitId`."},"transactionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the inventory transaction this batch transaction belongs to. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the batch that came into stock, in the item's stocking unit. It is 0 on an inventory revaluation, which changes the batch's cost without moving stock.","examples":["500.00"]},"outQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the batch that went out of stock, in the item's stocking unit."},"unitInQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that came into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit."},"unitOutQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that went out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"cost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The unit cost of the batch, in the currency named by `currency`. When stock comes in, it is the unit cost of the stock received. When stock goes out, it is the batch's unit cost at that time. On an inventory revaluation, it is the batch's new unit cost.","examples":["3.75"]},"valueDelta":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The change in the total value of the batch's stock from this transaction, in the currency named by `currency`. A negative value is a decrease.","examples":["1875.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency that `cost` and `valueDelta` are in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of document line the inventory transaction came from. Possible values: 'IMInventorySalesOrderLine', 'IMInventorySalesDeliveryLine', 'IMSalesOrderLine', 'IMInventoryPurchaseReturnLine', 'IMInventorySalesReturnLine', 'IMWarehouseTransferLine', 'IMInventoryDecreaseLine', 'IMInventoryIncreaseLine', 'IMInventoryRevaluationLine', 'IMInventoryTransferLine', 'IMInventoryAdjustmentLine', 'IMInventoryCountLine', 'IMInventoryPutAwayTask', 'IMInventoryPurchaseReturnReversal', 'PurchaseOrderLine', 'IMLandedCostAllocationLine', 'SalesOrderProductItem', 'IMWarehouseTransferOrderLine', 'VendorBillItemBase', 'InvPurchaseDeliveryLine'.","examples":["InvPurchaseDeliveryLine"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the batch transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the batch itself, such as its `expirationDate`, do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false},"landedCostItemsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost item. Format: UUID.","examples":["9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. Absent when the landed cost item covers only an account. See `id` on GET inventory/items/:id (getItem).","examples":["3d81e07c-95a2-4f63-b1c8-27e5a94d0b36"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["SVC-FREIGHT"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`.","examples":["Inbound freight"]},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. Absent when the landed cost item covers only an item. See `id` on GET accounting/accounts/:id (getAccount)."},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the account in `accountId`."},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the account in `accountId`."},"allocationMode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How a charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'.","examples":["Weight"]},"costingElementTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type. Absent when the landed cost item has none.","examples":["c4a90e21-7b35-4d18-9e02-6f13a85c7d40"]},"costingElementTypeCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the costing element type in `costingElementTypeId`.","examples":["FRT"]},"costingElementTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the costing element type in `costingElementTypeId`.","examples":["Freight"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the landed cost item is active.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the landed cost item was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T11:02:19.880Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the landed cost item last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"bulkDeleteTransferOrdersOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the deleted transfer orders, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteTransferOrdersInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the transfer orders to delete. All or nothing: if any is missing or is not 'DRAFT', none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"getShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned.","examples":["SD-8841"]},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD.","examples":["2026-08-19"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The display name of that customer.","examples":["Bakker Retail B.V."]},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"shipmentCarrierName":{"type":"string","description":"The name of that carrier.","examples":["PostNL"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods.","examples":["3SABCD1234567"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment.","examples":["PO-BAKKER-4417"]},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it.","examples":["OPEN"]},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency.","examples":["960.00"]},"notes":{"type":"string","description":"Free text on the shipment.","examples":["Palletised"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateLandedCostItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost item. Format: UUID.","examples":["9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"]}},"additionalProperties":false,"required":["id"]},"updateLandedCostItemInput":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. See `id` on GET inventory/items/:id (getItem)."},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. See `id` on GET accounting/accounts/:id (getAccount)."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Changing it does not change the charges already on landed costs. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'.","examples":["Quantity"]},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type."},"active":{"type":"boolean","description":"Whether the landed cost item is active."}},"additionalProperties":false},"createUnitOfMeasureOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createUnitOfMeasureInput":{"type":"object","properties":{"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. Required. It must be unique within the tenant.","examples":["KG"]},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'.","examples":["Kilogram"]}},"additionalProperties":false,"required":["unitCode","unitName"]},"searchSalesReturnsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you."},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"businessPartnerName":{"type":"string","description":"The name of that customer."},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line."},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'."},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back."},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency."},"notes":{"type":"string","description":"Free text on the document."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The matching returns for this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"INSPECTED","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-19T15:10:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"0.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit","inspectedQuantity":"6.00","approvedQuantity":"2.00","rejectedQuantity":"4.00","inspectedDate":"2026-08-19","qualityGrade":"C","rejectionReason":"Water ingress","inspectionDetails":[{"approvalStatus":"APPROVED","inspectedQuantity":"2.00","condition":"GOOD","disposition":"RETURN_TO_STOCK"},{"approvalStatus":"REJECTED","inspectedQuantity":"4.00","condition":"DAMAGED","disposition":"SCRAP","rejectionReason":"Water ingress"}]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchSalesReturnsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the return with this document number. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to returns with this status. The match is exact. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'."},"entityId":{"type":"string","description":"Limits results to returns for the legal entity with this identifier."},"businessPartnerId":{"type":"string","description":"Limits results to returns for the customer with this identifier. Despite the name, this is a customer id."},"locationId":{"type":"string","description":"Limits results to returns with a line for the warehouse with this identifier."},"itemId":{"type":"string","description":"Limits results to returns with a line for the item with this identifier."},"referenceNumber":{"type":"string","description":"Limits results to returns with this customer reference, for example an RMA number. The match is exact."},"trackingNumber":{"type":"string","description":"Limits results to returns with this carrier tracking number. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to returns dated on or after this date. Use format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to returns dated on or before this date. Use format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to returns changed on or after this time, in UTC. Use format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The criteria to apply, combined with AND. Omit to return all sales returns.","examples":[{"documentStatus":"RECEIVED"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The maximum number of returns to return. Defaults to 50. The maximum is 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"updateInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned.","examples":["INC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory increase.","examples":["August cycle count, recounted"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:40:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth, and unitPrice is calculated from it as lineValue divided by quantity. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"150.00","inventoryQuantity":"150.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"150.00","inventoryQuantity":"150.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"150.00","inventoryQuantity":"150.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"updateInventoryIncreaseInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"A new document date. It sets the posting period. Use format YYYY-MM-DD."},"reasonCodeId":{"type":"string","description":"A new reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it.","examples":["August cycle count, recounted"]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of lines to remove. Applied before updateLines and createLines."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line belonging to another inventory increase is rejected, not skipped."},"itemId":{"type":"string","description":"A new item for the line. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"A new unit for the line's quantity. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, in the line's unit. Greater than zero when given."},"unitPrice":{"type":"string","format":"decimal","description":"A new unit value, in the inventory increase's currency. Greater than zero when given. On a line valued by lineValue, a price equal to the one calculated from it (lineValue divided by the quantity as it will be stored after this update, at the currency's precision) changes nothing and the line keeps its lineValue; any other price becomes the line's valuation source and lineValue is cleared."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the batch."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Use format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch, in the line's unit. The batch quantities of a line must add up to the line's quantity."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches making up this line's quantity. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Sending this array replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false},"description":"The serialized units, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Sending this array replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity lands in. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number not on the line is rejected."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line. Sending this array replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, each addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","quantity":"150.00","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"150.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"150.00","batchNumber":"LOT-2026-08-14"}]}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency. Greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the batch."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Use format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch, in the line's unit. The batch quantities of a line must add up to the line's quantity."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches making up this line's quantity. Required for a batch-tracked item, and the quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false},"description":"The serialized units, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity lands in. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number not on the line is rejected."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity","unitPrice"]},"description":"The lines to add. They land at the inventory increase's existing warehouse. A document with no lines cannot take new ones."}},"additionalProperties":false},"commitInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentStatus":{"type":"string","description":"The status the revaluation is now in, read back from the document. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The unique identifier for the journal entry the commit wrote. Absent when the posting reported none. See id on GET accounting/journal-entries/:id.","examples":["3a91c74e-6b05-4d28-91f6-8c2e70a5d413"]},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"What the document moved on the balance sheet, in the revaluation's currency. Negative for a write-down.","examples":["-450"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the posting. An empty array on a clean run. The commit succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitInventoryRevaluationInput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteInventoryRevaluationsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted revaluations, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteInventoryRevaluationsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the revaluations to delete. If any is missing or is not a draft, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"createItemAttributeDefinitionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the new attribute.","examples":["c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48"]},"name":{"type":"string","description":"The attribute's name.","examples":["Colour"]},"description":{"type":"string","description":"What the attribute is for.","examples":["Product colour"]},"valueType":{"type":"string","description":"TEXT or NUMBER.","examples":["TEXT"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["id","value"]},"description":"The values this attribute allows, each with its own identifier.","examples":[[{"id":"2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03","value":"Red"},{"id":"8e1a5c39-4b62-4d17-9f08-3a7c21d5e690","value":"Green"},{"id":"5d92f7b1-6c04-4e83-a215-9b83f4e07c2d","value":"Blue"}]]}},"additionalProperties":false,"required":["id","name","values"]},"createItemAttributeDefinitionInput":{"type":"object","properties":{"name":{"type":"string","description":"The attribute's name, for example 'Colour'. Unique within the tenant.","examples":["Colour"]},"description":{"type":"string","description":"What the attribute is for. Free text, shown beside it in the UI.","examples":["Product colour"]},"valueType":{"type":"string","description":"TEXT or NUMBER. Defaults to TEXT. Under NUMBER every value must parse as a number.","examples":["TEXT"]},"values":{"type":"array","items":{"type":"string"},"description":"The values this attribute allows, for example ['Red','Green']. May be omitted to create the attribute with no values yet; there is no update route, so further values are added through the Item Attributes screen or a CSV upload.","examples":[["Red","Green","Blue"]]}},"additionalProperties":false,"required":["name"]},"applyVendorCreditOutput":{"type":"object","properties":{"appliedCount":{"type":"number","description":"The number of applications recorded. Read the credit with GET accounting/vendor-credits/:id for its remaining balance.","examples":[1]}},"additionalProperties":false,"required":["appliedCount"]},"applyVendorCreditInput":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"vendorBillId":{"type":"string","description":"The vendor bill the credit is applied to. See id on GET accounting/vendor-bills/:id."},"amount":{"type":"string","format":"decimal","description":"The amount applied to this bill, as a decimal in the bill's currency. It cannot exceed the bill's open amount or the credit's remaining balance."},"appliedDate":{"type":"string","format":"date","description":"The date the application is recorded on. Use format YYYY-MM-DD. It must be on or after both the bill date and the credit date. Defaults to today in the owning entity's time zone."}},"additionalProperties":false,"required":["vendorBillId","amount"]},"description":"The bills this credit is applied to, and how much goes to each. At least one is required.","examples":[[{"vendorBillId":"9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95","amount":"300.00","appliedDate":"2026-08-20"}]]}},"additionalProperties":false,"required":["applications"]},"deletePurchaseOrderOutput":{"type":"object","properties":{},"additionalProperties":false},"vendorsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor."},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal or trading name of the vendor."},"vendorNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor number, for example 'V-2041'. Absent until one has been assigned."},"vendorType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The kind of vendor. Possible values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'."},"vendorSubType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A finer classification within the vendor type. Possible values: 'direct', 'indirect'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle status of the vendor. Possible values: 'active', 'inactive'. An inactive vendor stays readable so historical documents still resolve, and is not offered for new ones."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The default payment-terms key applied to this vendor's bills, for example 'net30' or 'dueOnReceipt'. Stored as supplied."},"preferredCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the vendor prefers to be paid in. Format ISO 4217, for example 'USD'."},"independentContractor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whether the vendor is an independent contractor. Possible values: 'yes', 'no', 'unsure'."},"externalVendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this vendor has in an external system. It is not unique."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system that created the vendor, for example 'app'."},"mainContactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address of the vendor's main contact."},"mainContactName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor's main contact."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the vendor last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getPurchaseRequestOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase request."},"purchaseRequestNumber":{"type":"string","description":"The purchase request number, for example 'PR-1', unique across purchase requests. Absent until one has been assigned."},"description":{"type":"string","description":"A description of what is being requested. It is shown to the vendor."},"internalDescription":{"type":"string","description":"Internal notes on the request, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo intended for the vendor."},"status":{"type":"string","description":"The lifecycle and approval state, in one field. Possible values: 'pendingApproval', 'approved', 'rejected', 'closed'. This resource has no separate approvalStatus."},"currency":{"type":"string","description":"The currency the request is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"totalAmount":{"type":"string","format":"decimal","description":"The total requested amount, the sum of the line totals, in the request currency."},"startDate":{"type":"string","format":"date","description":"The first day of the period the request covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the request covers. Format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment-terms key requested for the resulting order, for example 'net30'."},"externalId":{"type":"string","description":"The identifier this request has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this request is directed at. See id on GET accounting/vendors/:id. Absent when no vendor has been chosen yet."},"vendorName":{"type":"string","description":"The name of the vendor this request is directed at."},"entityId":{"type":"string","description":"The legal entity this request belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this request belongs to."},"departmentId":{"type":"string","description":"The department raising the request. See id on GET people/departments/:id."},"departmentName":{"type":"string","description":"The name of the department raising the request."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase request last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"approvals":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","description":"What was decided. Values include 'approve' and 'reject'."},"employeeName":{"type":"string","description":"The name of the employee who decided."},"message":{"type":"string","description":"The reviewer's note, where one was given."},"decidedAt":{"type":"string","format":"date-time","description":"The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["decision","decidedAt"]},"description":"The approval decisions on this request, oldest first. An empty array when no approval policy has matched the request."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line number, for example 'PRL-1'. Unique across purchase request lines."},"description":{"type":"string","description":"A description of the line item."},"isItem":{"type":"boolean","description":"Whether the line references an inventory item. True for an item line, false for a free-text expense line. It is the item-versus-expense discriminator. There is no itemType field on this resource."},"quantity":{"type":"string","format":"decimal","description":"The quantity requested, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the request currency. Set on item lines. On expense lines the amount is on editableAmount instead."},"editableAmount":{"type":"string","format":"decimal","description":"The directly entered line amount, in the request currency. Used on expense lines, where there is no unit price to multiply."},"total":{"type":"string","format":"decimal","description":"The line total, in the request currency. price times quantity on an item line, editableAmount on an expense line."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. Always the request currency, on each line so the line is self-describing."},"status":{"type":"string","description":"The delivery state of the line. Possible values: 'undelivered', 'delivering', 'delivered'. It is a delivery status, not an approval status."},"priority":{"type":"string","description":"The requested priority of the line. Possible values: 'high', 'medium', 'low'."},"needByDate":{"type":"string","format":"date","description":"The date this line is needed by, when it differs from the header. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date this line was delivered. Format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Format YYYY-MM-DD."},"startDate":{"type":"string","format":"date","description":"The first day of the period this line covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period this line covers. Format YYYY-MM-DD."},"unitOfMeasure":{"type":"string","description":"The name of the unit of measure for the quantity."},"unitOfMeasureId":{"type":"string","description":"The unit of measure for the quantity. See id on GET inventory/unit-of-measures/:id."},"itemId":{"type":"string","description":"The item this line orders. See id on GET inventory/items/:id. Present only on an item line."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."}},"additionalProperties":false,"required":["id"]},"description":"The request line items, in their order on the request. An empty array when the request has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"outboundPaymentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the outbound payment."},"outboundPaymentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The outbound payment number. Absent until a number has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the payment."},"paymentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the payment was made. Format YYYY-MM-DD."},"paymentCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the payment is denominated in. Format ISO 4217, for example 'USD'."},"paymentType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the money was sent, for example 'ach', 'wire' or 'check'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The processing status of the payment."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Where the payment sits in the approval workflow."},"applicationStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How much of the payment has been applied to bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"paymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment reference assigned by the bank or payment provider. It is not filterable. Match on it through POST accounting/outbound-payments/search."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system this payment came from. Recorded when an integration created the payment."},"singlePayment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the payment covers a single bill rather than a batch."},"paymentAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the bank general ledger account the money left. It is not filterable. To scope by account, use paymentAccountId on POST accounting/outbound-payments/search."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that made the payment. It is not filterable. To scope by entity, use entityId on POST accounting/outbound-payments/search."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createPayrollTemplateOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payroll template.","examples":["d4a1c7e0-2b93-4f56-8071-9e3a5c8b1d42"]}},"additionalProperties":false,"required":["id"]},"createPayrollTemplateInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the payroll template. Unique across all payroll templates.","examples":["Germany monthly payroll"]},"groupBy":{"type":"string","description":"How payroll lines are entered. Accepted values: 'Employee', 'Department', 'Multi-level'.","examples":["Employee"]},"journalEntryDate":{"type":"string","description":"The date the journal entry uses. Accepted values: 'payrollDate', 'endDate'.","examples":["payrollDate"]},"journalEntryGroupBy":{"type":"string","description":"How journal lines are aggregated by default. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'.","examples":["account"]},"description":{"type":"string","description":"A free-form description of the template."},"clearingAccountId":{"type":"string","description":"The clearing account used when posting. See id on GET accounting/accounts/:id."},"source":{"type":"string","description":"The payroll system the template imports from. Accepted values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'."},"entityIds":{"type":"array","items":{"type":"string"},"description":"The complete set of legal entities this template serves. At least one is required. See id on GET base/entities.","examples":[["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]]},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the category. Unique within the template."},"subType":{"type":"string","description":"What the category represents. Accepted values: 'grossPay', 'deduction', 'netPay', 'employer'. At most one netPay category per template."},"status":{"type":"string","description":"Whether the category is usable. Accepted values: 'active', 'inactive'. Defaults to 'active'."},"payee":{"type":"string","description":"Who gets paid, as a payee code from your tenant's configured payee list, for example 'employee', 'payrollProvider', 'benefitsProvider' or 'taxOffice'."},"isManagedFromPayroll":{"type":"boolean","description":"Whether payment for this category is managed from payroll. Required, the category model has no default."},"debitAccountId":{"type":"string","description":"The account debited for this category. See id on GET accounting/accounts/:id."},"creditAccountId":{"type":"string","description":"The account credited for this category. See id on GET accounting/accounts/:id."},"debitJournalAggregation":{"type":"string","description":"How debit journal lines are aggregated. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'. Defaults to the template's setting. 'payrollCategoryByEmployee' requires groupBy 'Employee'."},"creditJournalAggregation":{"type":"string","description":"How credit journal lines are aggregated. The same values and rule as the debit side apply."},"debitTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension. Accepted values: 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category debits, at most one per dimension. Supported dimension: 'vendor'. Requires debitJournalAggregation to be above 'account'."},"creditTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension. Accepted values: 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category credits. The same values and rules as the debit side apply."}},"additionalProperties":false,"required":["name","subType","isManagedFromPayroll"]},"description":"The categories this template defines. At least one is required. Category names must be unique, and at most one category may be netPay.","examples":[[{"name":"Gross Pay","subType":"grossPay","payee":"employee","isManagedFromPayroll":false,"debitAccountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"},{"name":"Net Pay","subType":"netPay","payee":"employee","isManagedFromPayroll":false,"creditAccountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"}]]}},"additionalProperties":false,"required":["name","groupBy","journalEntryDate","journalEntryGroupBy","entityIds","categories"]},"rejectVendorBillOutput":{"type":"object","properties":{"status":{"type":"string","description":"The bill status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"rejectVendorBillInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the bill is being rejected, recorded against the approval decision. Omit for none.","examples":["Amount does not match the purchase order"]}},"additionalProperties":false},"updateExpenseCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateExpenseCategoryInput":{"type":"object","properties":{"category":{"type":"string","description":"The new name. Omit to leave it unchanged. It must stay unique across the tenant. The category's own current name is not a collision."},"categoryType":{"type":"string","description":"The new kind of expense. Accepted values: 'Pur', 'Dis', 'PerDiem'. Omit to leave it unchanged."},"status":{"type":"string","description":"The new lifecycle status. Accepted values: 'active', 'inactive'. Setting 'inactive' retires a category that is in use without deleting it.","examples":["inactive"]},"reimbursable":{"type":"boolean","description":"Whether expenses in this category are reimbursed to the employee. Omit to leave it unchanged."},"requireAttachment":{"type":"boolean","description":"Whether an expense in this category must have a receipt attachment. Omit to leave it unchanged."},"requireAttendees":{"type":"boolean","description":"Whether an expense in this category must list attendees. Omit to leave it unchanged.","examples":[true]},"entityIds":{"type":"array","items":{"type":"string"},"description":"The legal entities this category is available in. This array replaces the whole set. Omit to leave it unchanged. Send an empty array to clear it. See id on GET base/entities."},"accountIds":{"type":"array","items":{"type":"string"},"description":"The general ledger accounts that journal entries for this category's expense items use. This array replaces the whole set. Omit to leave it unchanged. See id on GET accounting/accounts/:id."}},"additionalProperties":false},"getVendorBillOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor bill."},"vendorBillNumber":{"type":"string","description":"The vendor bill number. Stable across edits."},"billNumber":{"type":"string","description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors."},"billDate":{"type":"string","format":"date","description":"The date printed on the vendor's invoice. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD. Absent when not recorded."},"dueDate":{"type":"string","format":"date","description":"The date payment is due. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the bill is denominated in. Format ISO 4217, for example 'USD'. Governs total, amountPaid, openAmount and every line amount."},"status":{"type":"string","description":"The approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'."},"paymentStatus":{"type":"string","description":"The payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"postingStatus":{"type":"string","description":"The accounting posting status, defined by the accounting subsystem, for example 'notPosted', 'posted' or 'postingFailed'."},"paymentTerms":{"type":"string","description":"The payment-terms key applied to this bill, for example 'net30', 'net60' or 'dueOnReceipt'. Inherited from the vendor unless overridden."},"total":{"type":"string","format":"decimal","description":"The total bill amount, gross, in the bill currency."},"amountPaid":{"type":"string","format":"decimal","description":"The cumulative amount paid against this bill so far, in the bill currency."},"openAmount":{"type":"string","format":"decimal","description":"The outstanding amount still owed, total minus amountPaid, in the bill currency."},"externalVendorBillId":{"type":"string","description":"The identifier this bill has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this bill is from. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this bill is from."},"entityId":{"type":"string","description":"The legal entity this bill is posted under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this bill is posted under."},"purchaseOrderId":{"type":"string","description":"The purchase order this bill is matched to. See id on GET accounting/purchase-orders/:id. The match is line-level, so it is absent when the bill is matched to no purchase order."},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order."},"externalPurchaseOrderNumber":{"type":"string","description":"The external reference of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order, or when that purchase order has no external reference."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"approvals":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","description":"What was decided. Values include 'approve' and 'reject'."},"employeeName":{"type":"string","description":"The name of the employee who decided."},"message":{"type":"string","description":"The reviewer's note, where one was given."},"decidedAt":{"type":"string","format":"date-time","description":"The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["decision","decidedAt"]},"description":"The approval decisions on this bill, oldest first. An empty array when no approval policy has matched the bill."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line item number."},"description":{"type":"string","description":"A description of the line item, typically copied from the vendor's invoice."},"lineType":{"type":"string","description":"The type of line item. Values include 'expense' and 'prepaidExpense'."},"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, in the bill currency."},"currency":{"type":"string","description":"The currency for the line. It always matches the bill currency. Format ISO 4217, for example 'USD'."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the bill currency."},"vatAmount":{"type":"string","format":"decimal","description":"The computed VAT amount on the line, in the bill currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 21 means 21%, not 0.21."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'."},"externalVendorBillItemId":{"type":"string","description":"The identifier this line has in the upstream system that produced it."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted bill reads 'notStarted' until the bill posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in the bill currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaidExpense'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The bill line items, in their order on the bill. An empty array when the bill has none."}},"additionalProperties":false,"required":["id","vendorBillNumber","billNumber","billDate","dueDate","currency","status","lastModifiedDate"]},"createVendorOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created vendor.","examples":["a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"]}},"additionalProperties":false,"required":["id"]},"createVendorInput":{"type":"object","properties":{"vendorName":{"type":"string","description":"The name of the vendor.","examples":["Acme GmbH"]},"vendorType":{"type":"string","description":"The kind of vendor. Accepted values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'.","examples":["supplier"]},"status":{"type":"string","description":"The lifecycle status. Accepted values: 'active', 'inactive'.","examples":["active"]},"paymentTerms":{"type":"string","description":"The default payment-terms key, for example 'net30', 'net60' or 'dueOnReceipt'. Stored as supplied.","examples":["net30"]},"vendorSubType":{"type":"string","description":"A finer classification, used when vendorType is 'supplier'. Accepted values: 'direct', 'indirect'."},"mainContactName":{"type":"string","description":"The full name of the primary contact.","examples":["Dana Fischer"]},"mainContactEmail":{"type":"string","description":"The email address of the primary contact."},"mainContactPhone":{"type":"string","description":"The phone number of the primary contact."},"billingEmail":{"type":"string","description":"The email address invoices and billing messages are sent to."},"preferredCurrency":{"type":"string","description":"The preferred transaction currency. Format ISO 4217, for example 'USD'.","examples":["EUR"]},"preferredLanguage":{"type":"string","description":"The language the vendor prefers for messages."},"independentContractor":{"type":"string","description":"Whether the vendor is an independent contractor. Accepted values: 'yes', 'no', 'unsure'."},"externalVendorId":{"type":"string","description":"The identifier this vendor has in an external system. It is not unique."},"origin":{"type":"string","description":"The source system this record came from."},"defaultAccountId":{"type":"string","description":"The general ledger account expenses for this vendor default to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department costs for this vendor default to. See id on GET people/departments/:id."},"vendorEntityId":{"type":"string","description":"The legal entity this vendor belongs to. See id on GET base/entities."},"bankDetails":{"type":"object","properties":{"bankAccountNumber":{"type":"string","description":"The vendor's bank account number, or IBAN."},"bankAccountType":{"type":"string","description":"The kind of bank account, as your tenant's account-type list spells it."},"bankAccountHolderName":{"type":"string","description":"The name the account is held in."},"bankAccountNumberType":{"type":"string","description":"How to read bankAccountNumber. Accepted values: 'iban', 'achOrWire', 'other'."},"financialInstitutionId":{"type":"string","description":"The bank's identifier, a BIC, SWIFT or routing number."},"financialInstitutionIdType":{"type":"string","description":"How to read financialInstitutionId."}},"additionalProperties":false,"description":"The bank account the vendor is paid into. Optional. You can add it later with PATCH accounting/vendors/:id."},"remittanceAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","zipCode","country"],"description":"The address remittance advice is sent to. Optional. You can add it later with PATCH accounting/vendors/:id."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"The files to attach to the vendor. Each names an already-uploaded file by its id."}},"additionalProperties":false,"required":["vendorName","vendorType","status","paymentTerms"]},"deactivateVendorOutput":{"type":"object","properties":{},"additionalProperties":false},"deactivateVendorInput":{"type":"object","properties":{},"additionalProperties":false},"deleteVendorCreditOutput":{"type":"object","properties":{},"additionalProperties":false},"searchPayrollDetailOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll run."},"payrollDetailNumber":{"type":"string","description":"The payroll run number. Absent until a number has been assigned."},"description":{"type":"string","description":"A description of the payroll run."},"periodName":{"type":"string","description":"The name of the payroll period this run covers, for example '2026-08'."},"payrollDate":{"type":"string","format":"date","description":"The date the payroll is dated. Format YYYY-MM-DD."},"startDate":{"type":"string","format":"date","description":"The first day of the period the run covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the run covers. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the run is denominated in. Format ISO 4217, for example 'USD'. Governs openAmount and every line amount."},"grouping":{"type":"string","description":"How the payroll run is grouped. Values include 'Employee', 'Department' and 'Multi-level'."},"paymentStatus":{"type":"string","description":"The payment status of the run. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"openAmount":{"type":"string","format":"decimal","description":"The amount still unpaid on this run, in currency."},"isImported":{"type":"boolean","description":"Whether the run was imported from a payroll provider rather than entered by hand."},"entityId":{"type":"string","description":"The legal entity the run belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the run belongs to."},"templateId":{"type":"string","description":"The payroll template this run was created from. See id on GET accounting/payroll-templates/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll run last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"lineLevel":{"type":"string","description":"The level this line sits at."},"employeeName":{"type":"string","description":"The name of the employee this line pays."},"unmatchedEmployeeName":{"type":"string","description":"The employee name as it arrived from the payroll provider when it matched no employee on file."},"departmentName":{"type":"string","description":"The name of the department this line is charged to."},"departmentCode":{"type":"string","description":"The code of that department."},"departmentNumber":{"type":"string","description":"The number of that department."},"totalAmount":{"type":"string","format":"decimal","description":"The total amount on the line, in the run currency."},"totalGrossAmount":{"type":"string","format":"decimal","description":"The gross pay on the line, in the run currency."},"totalNetAmount":{"type":"string","format":"decimal","description":"The net pay on the line, in the run currency."},"totalEmployerAmount":{"type":"string","format":"decimal","description":"The employer-side contributions on the line, in the run currency."},"errorMessage":{"type":"string","description":"Why this line could not be processed, when it failed."}},"additionalProperties":false,"required":["id"]},"description":"The payroll lines, one per employee or department depending on grouping. An empty array when the run has none."}},"additionalProperties":false,"required":["id","payrollDate","currency","lastModifiedDate"]},"description":"The payroll runs that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more runs remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPayrollDetailInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the payroll run with this identifier."},"payrollDetailNumber":{"type":"string","description":"Limits results to the payroll run with this number."},"periodName":{"type":"string","description":"Limits results to runs whose payroll period has this name."},"currency":{"type":"string","description":"Limits results to runs in this currency. Format ISO 4217, for example 'USD'."},"grouping":{"type":"string","description":"Limits results to runs grouped this way. Values include 'Employee', 'Department' and 'Multi-level'. Any other value matches no run."},"paymentStatus":{"type":"string","description":"Limits results to runs in this payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'. Any other value matches no run."},"isImported":{"type":"boolean","description":"Limits results to runs that were imported (true) or entered by hand (false)."},"entityId":{"type":"string","description":"Limits results to runs for this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to runs for a legal entity with this name."},"templateId":{"type":"string","description":"Limits results to runs created from this payroll template. See id on GET accounting/payroll-templates/:id."}},"additionalProperties":false,"description":"The filters to apply. A payroll run must match every filter you send. Omit to return all payroll runs.","examples":[{"paymentStatus":"unpaid"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of payroll runs per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"createExpenseCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created expense category.","examples":["b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"]}},"additionalProperties":false,"required":["id"]},"createExpenseCategoryInput":{"type":"object","properties":{"category":{"type":"string","description":"The name of the expense category, for example 'Client Entertainment'. Must be unique across the tenant.","examples":["Client Entertainment"]},"categoryType":{"type":"string","description":"The kind of expense. Accepted values: 'Pur', 'Dis', 'PerDiem'. 'Dis' is distance traveled. Omit to leave it unset.","examples":["Pur"]},"status":{"type":"string","description":"The lifecycle status. Accepted values: 'active', 'inactive'. Defaults to 'active'."},"reimbursable":{"type":"boolean","description":"Whether expenses in this category are reimbursed to the employee. Defaults to true. A reimbursable category must have at least one accountId.","examples":[true]},"requireAttachment":{"type":"boolean","description":"Whether an expense in this category must have a receipt attachment.","examples":[true]},"requireAttendees":{"type":"boolean","description":"Whether an expense in this category must list attendees."},"entityIds":{"type":"array","items":{"type":"string"},"description":"The legal entities this category is available in. This array replaces the whole set. Omit to leave it unchanged. Send an empty array to remove every entity. See id on GET base/entities."},"accountIds":{"type":"array","items":{"type":"string"},"description":"The general ledger accounts that journal entries for this category's expense items use. This array replaces the whole set. Required unless the category is not reimbursable. See id on GET accounting/accounts/:id.","examples":[["7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"]]}},"additionalProperties":false,"required":["category"]},"updateVendorBillOutput":{"type":"object","properties":{},"additionalProperties":false},"updateVendorBillInput":{"type":"object","properties":{"billNumber":{"type":"string","description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors. Omit to leave unchanged."},"billDate":{"type":"string","format":"date","description":"The date printed on the vendor's invoice. Use format YYYY-MM-DD. Omit to leave unchanged."},"dueDate":{"type":"string","format":"date","description":"The date payment is due. Use format YYYY-MM-DD. Omit to leave unchanged.","examples":["2026-09-15"]},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD. Omit to leave unchanged."},"currency":{"type":"string","description":"The currency of the bill. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"paymentTerms":{"type":"string","description":"The payment-terms key, for example 'net30', 'net60' or 'dueOnReceipt'. Omit to leave unchanged."},"vendorId":{"type":"string","description":"The vendor the bill is from. See id on GET accounting/vendors/:id. Omit to leave unchanged."},"entityId":{"type":"string","description":"The legal entity the bill is posted under. See id on GET base/entities. Omit to leave unchanged."},"markAsPaid":{"type":"boolean","description":"Whether the bill is marked paid. Omit to leave unchanged."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"createLines":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, including VAT where applicable, as a decimal in the bill currency."},"description":{"type":"string","description":"A description of the line item, typically copied from the vendor's invoice."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is charged to. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. It must differ from the bill's entity, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"customerId":{"type":"string","description":"The customer this expense is rebilled to. See id on GET accounting/customers/:id. It is only meaningful alongside billableExpense."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 19 means 19%, not 0.19."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the bill currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it."},"purchaseOrderLineId":{"type":"string","description":"The purchase-order line this line is matched against. There is no endpoint for it."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'."},"lineType":{"type":"string","description":"The kind of line. Values include 'expense' (a one-time cost) and 'prepaidExpense' (an upfront cost spread over several periods). Defaults to 'expense'."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. A new line has nothing to change or remove, so this is a plain array, the same shape POST accounting/vendor-bills takes."}},"additionalProperties":false,"required":["amount"]},"description":"Lines to add to the bill, each with the same shape as on create and no id. Omit for no additions."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this bill."},"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, as a decimal in the bill currency. Omit to leave unchanged."},"description":{"type":"string","description":"A description of the line item. Omit to leave unchanged."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id. Omit to leave unchanged."},"businessUnitId":{"type":"string","description":"The business unit this line is charged to. There is no endpoint for it. Omit to leave unchanged."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Omit to leave unchanged. It must differ from the bill's entity, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"customerId":{"type":"string","description":"The customer this expense is rebilled to. See id on GET accounting/customers/:id. Omit to leave unchanged."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 19 means 19%, not 0.19. Omit to leave unchanged."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the bill currency. Omit to leave unchanged."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it. Omit to leave unchanged."},"purchaseOrderLineId":{"type":"string","description":"The purchase-order line this line is matched against. There is no endpoint for it. Omit to leave unchanged."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'. Omit to leave unchanged."},"lineType":{"type":"string","description":"The kind of line. Values include 'expense' and 'prepaidExpense'. Omit to leave unchanged."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the accountId sent on this updateLines item. If that item doesn't send accountId, send deferredAccountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this line, each with no id. Omit for no additions. Send none of the three amortization arrays to leave this line's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the schedule to change. It must be one this line already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit to leave unchanged."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Omit to leave unchanged, unless this updateLines item also sends accountId, in which case it is set to that account."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'. Omit to leave unchanged."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. Omit to leave unchanged."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD. Omit to leave unchanged."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Omit to leave unchanged."},"description":{"type":"string","description":"A note to record against the schedule. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by the id the bill publishes. A schedule that has already started recognizing is refused with AMORTIZATION_SCHEDULE_POSTED. Omit for no changes."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this line. Each must be one this line carries, and one that has not started recognizing. Removing a schedule leaves this line's other books untouched."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by the id the bill publishes. Every field but the id is optional and left unchanged when omitted. Omit for no changes.","examples":[[{"id":"7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9","amount":"1350.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove, applied before the updates and creates. Each must belong to this bill. Removing a line also removes the amortization schedules it carried.","examples":[["1f2e3d4c-5b6a-7089-9a8b-7c6d5e4f3a2b"]]}},"additionalProperties":false},"approvePurchaseRequestOutput":{"type":"object","properties":{"status":{"type":"string","description":"The status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"approvePurchaseRequestInput":{"type":"object","properties":{},"additionalProperties":false},"searchVendorOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor."},"vendorName":{"type":"string","description":"The legal or trading name of the vendor."},"vendorNumber":{"type":"string","description":"The vendor number, for example 'V-2041'. Absent until one has been assigned."},"vendorType":{"type":"string","description":"The kind of vendor. Possible values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'."},"vendorSubType":{"type":"string","description":"A finer classification within the vendor type. Possible values: 'direct', 'indirect'."},"status":{"type":"string","description":"The lifecycle status of the vendor. Possible values: 'active', 'inactive'. An inactive vendor stays readable so historical documents still resolve, and is not offered for new ones."},"paymentTerms":{"type":"string","description":"The default payment-terms key applied to this vendor's bills, for example 'net30' or 'dueOnReceipt'. Stored as supplied."},"preferredCurrency":{"type":"string","description":"The currency the vendor prefers to be paid in. Format ISO 4217, for example 'USD'."},"preferredLanguage":{"type":"string","description":"The language the vendor prefers for messages."},"independentContractor":{"type":"string","description":"Whether the vendor is an independent contractor. Possible values: 'yes', 'no', 'unsure'."},"externalVendorId":{"type":"string","description":"The identifier this vendor has in an external system. It is not unique."},"origin":{"type":"string","description":"The source system that created the vendor, for example 'app'."},"mainContactName":{"type":"string","description":"The name of the vendor's main contact."},"mainContactEmail":{"type":"string","description":"The email address of the vendor's main contact."},"mainContactPhone":{"type":"string","description":"The phone number of the vendor's main contact."},"billingEmail":{"type":"string","description":"The email address invoices and remittance advice are sent to."},"entityId":{"type":"string","description":"The legal entity the vendor is registered under. See id on GET base/entities."},"defaultAccountId":{"type":"string","description":"The general ledger account this vendor's spend defaults to. See id on GET accounting/accounts/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","vendorName","vendorType","status","paymentTerms","lastModifiedDate"]},"description":"The vendors on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchVendorInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the vendor with this identifier."},"vendorName":{"type":"string","description":"Limits results to vendors with this exact name. The match is case-sensitive."},"vendorNumber":{"type":"string","description":"Limits results to vendors with this vendor number. It is not guaranteed unique, so this can return several vendors."},"vendorType":{"type":"string","description":"Limits results to vendors of this kind. Accepted values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'. Any other value matches no vendor."},"vendorSubType":{"type":"string","description":"Limits results to vendors of this sub-type. Accepted values: 'direct', 'indirect'. Any other value matches no vendor."},"status":{"type":"string","description":"Limits results to vendors in this lifecycle status. Accepted values: 'active', 'inactive'. Any other value matches no vendor."},"entityId":{"type":"string","description":"Limits results to vendors registered under this legal entity. An id that matches no entity returns no vendor. See id on GET base/entities."},"mainContactEmail":{"type":"string","description":"Limits results to vendors whose main contact has this email address. Useful for finding a duplicate before creating another vendor."},"externalVendorId":{"type":"string","description":"Limits results to vendors with this external identifier. It is not unique, so this can return several vendors."}},"additionalProperties":false,"description":"The filters to apply. A vendor must match every filter you send. Omit to return all vendors.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of vendors per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"voidVendorBillOutput":{"type":"object","properties":{},"additionalProperties":false},"voidVendorBillInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the bill is being voided. Stored on the bill and shown in the audit trail. An empty or whitespace-only string is refused.","examples":["Duplicate of VB-295012"]}},"additionalProperties":false,"required":["voidReason"]},"issueEmployeeAdvanceRequestOutput":{"type":"object","properties":{"outboundPaymentId":{"type":"string","description":"Id (a UUID) of the OutboundPaymentHeaderBase created for this issuance.","examples":["c3d8f4a1-7e2b-4c95-9a03-5f1d8e6b2c47"]}},"additionalProperties":false,"required":["outboundPaymentId"]},"issueEmployeeAdvanceRequestInput":{"type":"object","properties":{"paymentDate":{"type":"string","format":"date","description":"Payment execution date. Omit to default to the appserver's current day.","examples":["2026-09-05"]}},"additionalProperties":false},"updateEmployeeAdvanceRequestOutput":{"type":"object","properties":{},"additionalProperties":false},"updateEmployeeAdvanceRequestInput":{"type":"object","properties":{"categoryId":{"type":"string","description":"Id (a UUID) of the AdvancePaymentCategory this request draws from. Must belong to the calling employee's own entity.","examples":["5c8e2f14-9a3b-4d67-8e21-1b4c6a9d3e02"]},"amount":{"type":"string","format":"decimal","description":"Requested amount, in the calling employee's entity functional currency. Must be greater than zero. Stored as the request's single purpose line.","examples":["900.00"]},"purpose":{"type":"string","description":"What the advance is for. Required, non-blank. Stored as the request's single purpose line.","examples":["Client site visit — flights, hotel and ground transport"]},"tripStart":{"type":"string","format":"date","description":"First day of the trip the advance covers. Optional."},"tripEnd":{"type":"string","format":"date","description":"Last day of the trip the advance covers. Must not be before tripStart. Optional."},"notes":{"type":"string","description":"Free-text notes from the requester. Optional."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"Display name of the attached file."},"fileId":{"type":"string","description":"Id of the already-uploaded file."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the request. Replaces the stored set entirely (this is a full replace, not a partial patch). A tenant may require at least one; see ATTACHMENT_REQUIRED.","examples":[[{"fileName":"itinerary.pdf","fileId":"3f9c1e2a-7b4d-4e6f-9a1c-2d5e8f0b6c3a"}]]}},"additionalProperties":false,"required":["categoryId","amount","purpose"]},"updateVendorOutput":{"type":"object","properties":{},"additionalProperties":false},"updateVendorInput":{"type":"object","properties":{"vendorName":{"type":"string","description":"The new name of the vendor. Omit to leave it unchanged."},"status":{"type":"string","description":"The new lifecycle status. Accepted values: 'active', 'inactive'. Setting 'inactive' retires a vendor with history without deleting it."},"paymentTerms":{"type":"string","description":"The new default payment-terms key. Omit to leave it unchanged. Stored as supplied.","examples":["net60"]},"vendorSubType":{"type":"string","description":"The new sub-type. Accepted values: 'direct', 'indirect'. Omit to leave it unchanged."},"mainContactName":{"type":"string","description":"The new primary contact name. Omit to leave it unchanged.","examples":["Dana Fischer-Weiss"]},"mainContactEmail":{"type":"string","description":"The new primary contact email. Omit to leave it unchanged."},"mainContactPhone":{"type":"string","description":"The new primary contact phone. Omit to leave it unchanged."},"billingEmail":{"type":"string","description":"The new billing email. Omit to leave it unchanged."},"preferredCurrency":{"type":"string","description":"The new preferred currency. Format ISO 4217, for example 'USD'. Omit to leave it unchanged."},"preferredLanguage":{"type":"string","description":"The new preferred language. Omit to leave it unchanged."},"independentContractor":{"type":"string","description":"The new independent-contractor value. Accepted values: 'yes', 'no', 'unsure'. Omit to leave it unchanged."},"origin":{"type":"string","description":"The new source system. Omit to leave it unchanged."},"defaultAccountId":{"type":"string","description":"The new default general ledger account. Omit to leave it unchanged. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The new default department. Omit to leave it unchanged. See id on GET people/departments/:id."},"vendorEntityId":{"type":"string","description":"The new legal entity. Omit to leave it unchanged. See id on GET base/entities."},"bankDetails":{"type":"object","properties":{"bankAccountNumber":{"type":"string","description":"The vendor's bank account number, or IBAN."},"bankAccountType":{"type":"string","description":"The kind of bank account, as your tenant's account-type list spells it."},"bankAccountHolderName":{"type":"string","description":"The name the account is held in."},"bankAccountNumberType":{"type":"string","description":"How to read bankAccountNumber. Accepted values: 'iban', 'achOrWire', 'other'."},"financialInstitutionId":{"type":"string","description":"The bank's identifier, a BIC, SWIFT or routing number."},"financialInstitutionIdType":{"type":"string","description":"How to read financialInstitutionId."}},"additionalProperties":false,"description":"The bank account the vendor is paid into. Sending this replaces the bank-detail fields. Omit it to leave the bank details unchanged."},"remittanceAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","zipCode","country"],"description":"The address remittance advice is sent to. Sending this replaces the address fields. Omit it to leave the address unchanged."},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file."}},"additionalProperties":false,"required":["fileName","fileId"]}},{"type":"null"}],"description":"The files attached to the vendor. Omit to keep the current files. Send null or an empty array to remove them all. A list you send replaces the whole list."}},"additionalProperties":false},"createOutboundPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payment.","examples":["e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12"]}},"additionalProperties":false,"required":["id"]},"createOutboundPaymentInput":{"type":"object","properties":{"accountId":{"type":"string","description":"The bank or cash account the payment is made from. See id on GET accounting/accounts/:id.","examples":["6d1e4b27-8a90-4c31-b5f2-7e8a9c0d1b23"]},"entityId":{"type":"string","description":"The legal entity the payment is posted under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Use format YYYY-MM-DD.","examples":["2026-08-27"]},"paymentCurrency":{"type":"string","description":"The currency of the payment. Format ISO 4217, for example 'USD'. Governs each item's amount unless the item names its own currency.","examples":["USD"]},"documentType":{"type":"string","description":"The one kind of document every item pays, either 'VendorBillHeaderBase' or 'ExpenseReportBase'. A payment pays one kind, not a mixture.","examples":["VendorBillHeaderBase"]},"singlePayment":{"type":"boolean","description":"Whether this is a single payment rather than a batch."},"commonDescription":{"type":"string","description":"A description applied to the payment as a whole."},"skipJournalEntry":{"type":"boolean","description":"Whether to skip journal-entry creation for this payment. Defaults to false."},"externalUrl":{"type":"string","description":"A link back to the payment in the upstream system."},"origin":{"type":"string","description":"The source system this payment came from."},"senderAccountId":{"type":"string","description":"A bank account identifier for the sender, supplied by an integration. It is free-form text, not a reference to an account record."},"actualExchangeRate":{"type":"string","format":"decimal","description":"The exchange rate the bank actually applied, as a decimal."},"systemExchangeRate":{"type":"string","format":"decimal","description":"The exchange rate the system derived, as a decimal."},"paymentItems":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","description":"The vendor bill or expense report being paid, of the kind named by documentType. See id on GET accounting/vendor-bills/:id or GET accounting/expense-reports/:id."},"entityId":{"type":"string","description":"The legal entity the document is posted under. See id on GET base/entities."},"amount":{"type":"string","format":"decimal","description":"The amount applied to this document, as a decimal."},"currency":{"type":"string","description":"The currency for this item. Format ISO 4217, for example 'USD'. Omit to use the payment's currency."},"description":{"type":"string","description":"What this item pays for. Required."}},"additionalProperties":false,"required":["documentId","entityId","amount","description"]},"description":"The documents this payment settles. At least one is required.","examples":[[{"documentId":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6","entityId":"8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e","amount":"1200.00","description":"Invoice 5512"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the payment. Each names an already-uploaded file by its id."}},"additionalProperties":false,"required":["accountId","entityId","paymentDate","paymentCurrency","documentType","paymentItems"]},"searchVendorCreditOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor credit."},"vendorCreditNumber":{"type":"string","description":"The vendor credit number. Absent until a number has been assigned."},"referenceNumber":{"type":"string","description":"The vendor's credit memo reference number, as printed on the vendor's document."},"creditDate":{"type":"string","format":"date","description":"The date on the vendor's credit memo. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the credit is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"status":{"type":"string","description":"The application status, how much of the credit has been set against vendor bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalAmount":{"type":"string","format":"decimal","description":"The total credit amount, in currency."},"externalId":{"type":"string","description":"The identifier this credit has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this credit is from. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this credit is from."},"entityId":{"type":"string","description":"The legal entity this credit is booked under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this credit is booked under."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor credit last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line item number."},"description":{"type":"string","description":"A description of the credit line item."},"lineType":{"type":"string","description":"The type of line item. Possible values: 'expense', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The line credit amount, in the credit currency."},"currency":{"type":"string","description":"The currency for the line. It always matches the credit currency. Format ISO 4217, for example 'USD'."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the credit currency."},"vatAmount":{"type":"string","format":"decimal","description":"The computed VAT amount on the line, in the credit currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 19 means 19%, not 0.19."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted credit reads 'notStarted' until the credit posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in the credit currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The credit line items, in their order on the credit. An empty array when the credit has none."}},"additionalProperties":false,"required":["id","referenceNumber","creditDate","currency","lastModifiedDate"]},"description":"The vendor credits that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more credits remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchVendorCreditInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the vendor credit with this identifier."},"vendorCreditNumber":{"type":"string","description":"Limits results to the vendor credit with this number."},"referenceNumber":{"type":"string","description":"Limits results to credits with this vendor reference number. It is not unique, so this can match several credits."},"vendorId":{"type":"string","description":"Limits results to credits from this vendor. See id on GET accounting/vendors/:id."},"entityId":{"type":"string","description":"Limits results to credits booked under this legal entity. See id on GET base/entities."},"vendorName":{"type":"string","description":"Limits results to credits from a vendor with this name."},"entityName":{"type":"string","description":"Limits results to credits booked under a legal entity with this name."},"status":{"type":"string","description":"Limits results to credits in this application status. Values include 'unapplied', 'partiallyApplied' and 'applied'. Any other value matches no credit."},"externalId":{"type":"string","description":"Limits results to credits with this upstream identifier. It is not unique, so this can match several credits."}},"additionalProperties":false,"description":"The filters to apply. A vendor credit must match every filter you send. Omit to return all vendor credits.","examples":[{"status":"unapplied"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of vendor credits per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"createPayrollPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payroll payment.","examples":["3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"]}},"additionalProperties":false,"required":["id"]},"createPayrollPaymentInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the payment is posted under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Use format YYYY-MM-DD.","examples":["2026-08-31"]},"paymentCurrency":{"type":"string","description":"The currency of the payment. Format ISO 4217, for example 'USD'. Governs every application amount.","examples":["EUR"]},"paymentStatus":{"type":"string","description":"The status to record the payment with, for example 'manuallyRecorded' or 'scheduled'.","examples":["manuallyRecorded"]},"paymentType":{"type":"string","description":"How the payment is made. Values include 'manual' and 'bank'. Defaults to 'manual'.","examples":["manual"]},"accountId":{"type":"string","description":"The bank or cash account the payment is drawn from. See id on GET accounting/accounts/:id."},"commonDescription":{"type":"string","description":"A description applied to the payment as a whole."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"applications":{"type":"array","items":{"type":"object","properties":{"payrollDetailId":{"type":"string","description":"The payroll detail being paid. See id on GET accounting/payroll-details/:id."},"accountId":{"type":"string","description":"The account the payment is booked against. See id on GET accounting/accounts/:id."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration, for example 'employee' or 'taxOffice'."},"amountPaid":{"type":"string","format":"decimal","description":"The amount applied to this payroll detail, as a decimal in the payment's currency."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a third party. See id on GET accounting/vendors/:id."},"employeeId":{"type":"string","description":"The employee being paid. There is no endpoint for it."},"description":{"type":"string","description":"A description for this application."}},"additionalProperties":false,"required":["payrollDetailId","accountId","payeeCode","amountPaid"]},"description":"The payroll runs this payment settles, one application per payroll detail. At least one is required.","examples":[[{"payrollDetailId":"b7e4c1a9-3f52-4d86-9017-5a2c8e0b4d61","accountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24","payeeCode":"employee","amountPaid":"12500.00"}]]}},"additionalProperties":false,"required":["entityId","paymentDate","paymentCurrency","paymentStatus","applications"]},"payrollTemplatesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll template."},"name":{"type":"string","description":"The name of the payroll template. Unique across payroll templates."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the payroll template."},"groupBy":{"type":"string","description":"The level at which payroll amounts are entered. Possible values: 'Employee', 'Department', 'Multi-level'."},"journalEntryDate":{"type":"string","description":"The date the generated journal entry is posted on. Possible values: 'payrollDate', 'endDate'."},"journalEntryGroupBy":{"type":"string","description":"The default consolidation level for generated journal lines. Possible values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'."},"deductionsType":{"type":"string","description":"Whether deduction amounts in imported data arrive positive or negative. Possible values: 'positive', 'negative'."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payroll system this template imports from. Possible values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle status of the payroll template. Possible values: 'create', 'active', 'inactive'. It is computed from the template's categories, not set through the API."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the payroll template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"expenseReportsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense report."},"expenseNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The expense number."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status of the report. Values include 'draft', 'pendingApproval', 'approved', 'rejected' and 'paid'."},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment status of the report."},"submittedDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the employee submitted the report. Format YYYY-MM-DD."},"reimbursementCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the report is reimbursed in. Format ISO 4217, for example 'USD'. Governs every header total below."},"reimbursableTotal":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total reimbursable amount across the report's items, in reimbursementCurrency."},"reimbursableTotalNetAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total reimbursable amount excluding VAT, in reimbursementCurrency."},"amountPaid":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount already reimbursed to the employee, in reimbursementCurrency."},"openAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount still owed to the employee, reimbursableTotal minus amountPaid, in reimbursementCurrency."},"pendingAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount committed to an in-flight payment run but not yet paid, in reimbursementCurrency."},"containsBillableItem":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether at least one item on the report is marked billable to a customer."},"pendingPayment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether a payment for this report is in flight."},"externalExpenseReportId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this report has in the upstream system that produced it. It is not unique."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system this report came from, as free-form text."},"employeeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the employee the report belongs to."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the report is posted under."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the expense report last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchPayrollPaymentOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment."},"payrollPaymentNumber":{"type":"string","description":"The payment number. Absent until a number has been assigned."},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is made in. Format ISO 4217, for example 'USD'. Governs totalPaid and every application amount."},"paymentType":{"type":"string","description":"How the payment was made: the instrument, not the origin. Values include 'manual' and 'bank'."},"status":{"type":"string","description":"The status of the payment. Values include 'successful', 'rejected', 'cancelled', 'processing', 'partiallySuccessful', 'unknown', 'unsigned', 'manuallyRecorded', 'scheduled' and 'voided'."},"approvalStatus":{"type":"string","description":"The approval status of the payment."},"description":{"type":"string","description":"A description recorded on the payment."},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid, in paymentCurrency."},"externalId":{"type":"string","description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"paymentAccountId":{"type":"string","description":"The general ledger account the payment is booked against. See id on GET accounting/accounts/:id."},"paymentAccountName":{"type":"string","description":"The name of the general ledger account the payment is booked against."},"entityId":{"type":"string","description":"The legal entity that made the payment. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment application."},"applicationNumber":{"type":"string","description":"The application number."},"description":{"type":"string","description":"A description of the application."},"amountPaid":{"type":"string","format":"decimal","description":"The amount paid by this application, as a decimal in currency."},"currency":{"type":"string","description":"The currency governing amountPaid, the payroll run's currency. Format ISO 4217, for example 'USD'."},"paymentStatus":{"type":"string","description":"The status of the paying payment item, mirrored onto the application. It uses the same values as the payment's status."},"payrollDetailId":{"type":"string","description":"The payroll detail this application settles. See id on GET accounting/payroll-details/:id."},"accountId":{"type":"string","description":"The general ledger account this application is booked against. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the general ledger account this application is booked against."},"accountNumber":{"type":"string","description":"The number of the general ledger account this application is booked against."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration, for example 'employee' or 'taxOffice'."},"payeeLabel":{"type":"string","description":"The display label for the payee."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a vendor. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor being paid."},"employeeId":{"type":"string","description":"The employee being paid, when the payee is an employee. There is no endpoint for it."},"employeeName":{"type":"string","description":"The name of the employee being paid."}},"additionalProperties":false,"required":["id"]},"description":"The payroll payment applications, each tying part of this payment to one payroll detail and one payee. An empty array when the payment has none."}},"additionalProperties":false,"required":["id","paymentDate","paymentCurrency","paymentType","status","lastModifiedDate"]},"description":"The payroll payments that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more payments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPayrollPaymentInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the payroll payment with this identifier."},"payrollPaymentNumber":{"type":"string","description":"Limits results to the payroll payment with this number."},"entityId":{"type":"string","description":"Limits results to payments made by this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to payments made by a legal entity with this name. The match is exact and case-sensitive."},"paymentAccountId":{"type":"string","description":"Limits results to payments booked against this general ledger account. See id on GET accounting/accounts/:id."},"paymentType":{"type":"string","description":"Limits results to payments made this way. Values include 'manual' and 'bank'. Any other value matches no payment."},"paymentCurrency":{"type":"string","description":"Limits results to payments in this currency. Format ISO 4217, for example 'USD'."},"status":{"type":"string","description":"Limits results to payments in this status. Values include 'successful', 'rejected', 'cancelled', 'processing', 'partiallySuccessful', 'unknown', 'unsigned', 'manuallyRecorded', 'scheduled' and 'voided'. Any other value matches no payment."},"approvalStatus":{"type":"string","description":"Limits results to payments in this approval status."},"externalId":{"type":"string","description":"Limits results to payments with this upstream identifier. It is not unique, so this can match several payments."}},"additionalProperties":false,"description":"The filters to apply. A payroll payment must match every filter you send. Omit to return all payroll payments.","examples":[{"status":"successful"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of payroll payments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchAdvancePaymentCategoriesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityId":{"type":"string"},"name":{"type":"string"},"allowManualPayment":{"type":"boolean"},"status":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","entityId","name","lastModifiedDate"]},"description":"Matching advance payment categories for this page, newest first."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as page.cursor for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAdvancePaymentCategoriesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"entityId":{"type":"string","description":"Restrict to the category belonging to this entity (a UUID). An entity has at most one category, so this matches at most one item. A uuid that matches no entity returns an empty page, not an error."},"name":{"type":"string","description":"Exact match on the category's display name."},"status":{"type":"string","description":"Restrict to categories in this lifecycle status: active or inactive."}},"additionalProperties":false,"description":"Search filters, nested as one object. All are optional and are ANDed; omit the whole object to match every category.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page."},"size":{"type":"number","description":"Maximum number of categories to return. Defaults to 50, capped at 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchPurchaseRequestOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase request."},"purchaseRequestNumber":{"type":"string","description":"The purchase request number, for example 'PR-1', unique across purchase requests. Absent until one has been assigned."},"description":{"type":"string","description":"A description of what is being requested. It is shown to the vendor."},"internalDescription":{"type":"string","description":"Internal notes on the request, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo intended for the vendor."},"status":{"type":"string","description":"The lifecycle and approval state, in one field. Possible values: 'pendingApproval', 'approved', 'rejected', 'closed'. This resource has no separate approvalStatus."},"currency":{"type":"string","description":"The currency the request is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"totalAmount":{"type":"string","format":"decimal","description":"The total requested amount, the sum of the line totals, in the request currency."},"startDate":{"type":"string","format":"date","description":"The first day of the period the request covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the request covers. Format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment-terms key requested for the resulting order, for example 'net30'."},"externalId":{"type":"string","description":"The identifier this request has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this request is directed at. See id on GET accounting/vendors/:id. Absent when no vendor has been chosen yet."},"vendorName":{"type":"string","description":"The name of the vendor this request is directed at."},"entityId":{"type":"string","description":"The legal entity this request belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this request belongs to."},"departmentId":{"type":"string","description":"The department raising the request. See id on GET people/departments/:id."},"departmentName":{"type":"string","description":"The name of the department raising the request."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase request last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line number, for example 'PRL-1'. Unique across purchase request lines."},"description":{"type":"string","description":"A description of the line item."},"isItem":{"type":"boolean","description":"Whether the line references an inventory item. True for an item line, false for a free-text expense line. It is the item-versus-expense discriminator. There is no itemType field on this resource."},"quantity":{"type":"string","format":"decimal","description":"The quantity requested, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the request currency. Set on item lines. On expense lines the amount is on editableAmount instead."},"editableAmount":{"type":"string","format":"decimal","description":"The directly entered line amount, in the request currency. Used on expense lines, where there is no unit price to multiply."},"total":{"type":"string","format":"decimal","description":"The line total, in the request currency. price times quantity on an item line, editableAmount on an expense line."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. Always the request currency, on each line so the line is self-describing."},"status":{"type":"string","description":"The delivery state of the line. Possible values: 'undelivered', 'delivering', 'delivered'. It is a delivery status, not an approval status."},"priority":{"type":"string","description":"The requested priority of the line. Possible values: 'high', 'medium', 'low'."},"needByDate":{"type":"string","format":"date","description":"The date this line is needed by, when it differs from the header. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date this line was delivered. Format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Format YYYY-MM-DD."},"startDate":{"type":"string","format":"date","description":"The first day of the period this line covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period this line covers. Format YYYY-MM-DD."},"unitOfMeasure":{"type":"string","description":"The name of the unit of measure for the quantity."},"unitOfMeasureId":{"type":"string","description":"The unit of measure for the quantity. See id on GET inventory/unit-of-measures/:id."},"itemId":{"type":"string","description":"The item this line orders. See id on GET inventory/items/:id. Present only on an item line."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."}},"additionalProperties":false,"required":["id"]},"description":"The request line items, in their order on the request. An empty array when the request has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The purchase requests on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPurchaseRequestInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the purchase request with this id. GET accounting/purchase-requests/:id does the same more cheaply."},"purchaseRequestNumber":{"type":"string","description":"Limits results to the request with this number, for example 'PR-1'. The match is exact. It is unique, so this returns at most one."},"status":{"type":"string","description":"Limits results to requests in this state. Accepted values: 'pendingApproval', 'approved', 'rejected', 'closed'. Any other value matches no request."},"currency":{"type":"string","description":"Limits results to requests denominated in this currency. Format ISO 4217, for example 'USD'."},"paymentTerms":{"type":"string","description":"Limits results to requests with this payment-terms key, for example 'net30'. The match is exact."},"externalId":{"type":"string","description":"Limits results to requests with this external identifier. The match is exact. It is not unique, so this can return several requests."},"vendorId":{"type":"string","description":"Limits results to requests directed at this vendor. See id on GET accounting/vendors/:id. An id that matches no vendor returns an empty page, not an error."},"entityId":{"type":"string","description":"Limits results to requests of this legal entity. See id on GET base/entities. An id that matches no entity returns an empty page, not an error."},"departmentId":{"type":"string","description":"Limits results to requests raised by this department. See id on GET people/departments/:id. An id that matches no department returns an empty page, not an error."},"vendorName":{"type":"string","description":"Limits results to requests whose vendor has this name. The match is exact and case-sensitive. Use vendorId when you already have the id."},"entityName":{"type":"string","description":"Limits results to requests whose legal entity has this name. The match is exact and case-sensitive."}},"additionalProperties":false,"description":"The filters to apply. A purchase request must match every filter you send. Omit to return all purchase requests.","examples":[{"status":"pendingApproval"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of purchase requests per page. Defaults to 50, capped at 200. The server may return fewer, never more."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchPayrollTemplateOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll template."},"name":{"type":"string","description":"The name of the payroll template. Unique across payroll templates."},"description":{"type":"string","description":"A free-form description of the payroll template."},"groupBy":{"type":"string","description":"The level at which payroll amounts are entered. Possible values: 'Employee', 'Department', 'Multi-level'."},"journalEntryDate":{"type":"string","description":"The date the generated journal entry is posted on. Possible values: 'payrollDate', 'endDate'."},"journalEntryGroupBy":{"type":"string","description":"The default consolidation level for generated journal lines. Possible values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'."},"deductionsType":{"type":"string","description":"Whether deduction amounts in imported data arrive positive or negative. Possible values: 'positive', 'negative'."},"source":{"type":"string","description":"The payroll system this template imports from. Possible values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'."},"status":{"type":"string","description":"The lifecycle status of the payroll template. Possible values: 'create', 'active', 'inactive'. It is computed from the template's categories, not set through the API."},"clearingAccountId":{"type":"string","description":"The general ledger account payroll amounts are cleared through. See id on GET accounting/accounts/:id."},"entities":{"type":"array","items":{"type":"string"},"description":"The names of the legal entities this template is mapped to. An empty array when it is mapped to none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll category."},"name":{"type":"string","description":"The name of the category, for example 'Gross Salary'. Unique within the template."},"subType":{"type":"string","description":"The kind of payroll amount this category represents. Possible values: 'grossPay', 'deduction', 'netPay', 'employer'."},"status":{"type":"string","description":"The lifecycle status of the category. Possible values: 'active', 'inactive'."},"payee":{"type":"string","description":"Who the amount is paid to, as a payee code from your tenant's configured payee list, for example 'employee', 'payrollProvider', 'benefitsProvider' or 'taxOffice'."},"isManagedFromPayroll":{"type":"boolean","description":"Whether payments for this category are recorded through payroll rather than separately."},"debitAccountId":{"type":"string","description":"The general ledger account this category debits. See id on GET accounting/accounts/:id."},"debitJournalAggregation":{"type":"string","description":"The consolidation level for journal lines posted to the debit account. Absent means the template default applies."},"creditAccountId":{"type":"string","description":"The general ledger account this category credits. See id on GET accounting/accounts/:id."},"creditJournalAggregation":{"type":"string","description":"The consolidation level for journal lines posted to the credit account. Absent means the template default applies."},"debitTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension, e.g. 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category debits, one per dimension. Absent when none."},"creditTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension, e.g. 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category credits, one per dimension. Absent when none."}},"additionalProperties":false,"required":["id","name","subType"]},"description":"The payroll categories defined on this template, each mapping one payroll line type onto a debit and a credit account. An empty array when the template has none."}},"additionalProperties":false,"required":["id","name","groupBy","journalEntryDate","journalEntryGroupBy","deductionsType","entities","lastModifiedDate"]},"description":"The payroll templates on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPayrollTemplateInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the template with this identifier."},"name":{"type":"string","description":"Limits results to the template with this exact name. The name is unique across payroll templates, so this returns at most one template."},"groupBy":{"type":"string","description":"Limits results to templates that enter amounts at this level. Accepted values: 'Employee', 'Department', 'Multi-level'. Any other value matches no template."},"status":{"type":"string","description":"Limits results to templates in this lifecycle status. Accepted values: 'create', 'active', 'inactive'. Any other value matches no template."},"source":{"type":"string","description":"Limits results to templates importing from this payroll system. Accepted values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'. Any other value matches no template."},"journalEntryGroupBy":{"type":"string","description":"Limits results to templates with this default journal consolidation level. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'. Any other value matches no template."},"entityId":{"type":"string","description":"Limits results to templates mapped to this legal entity. An id that matches no entity returns no template. See id on GET base/entities."}},"additionalProperties":false,"description":"The filters to apply. A template must match every filter you send. Omit to return all payroll templates.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of payroll templates per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"getVendorOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor."},"vendorName":{"type":"string","description":"The legal or trading name of the vendor."},"vendorNumber":{"type":"string","description":"The vendor number, for example 'V-2041'. Absent until one has been assigned."},"vendorType":{"type":"string","description":"The kind of vendor. Possible values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'."},"vendorSubType":{"type":"string","description":"A finer classification within the vendor type. Possible values: 'direct', 'indirect'."},"status":{"type":"string","description":"The lifecycle status of the vendor. Possible values: 'active', 'inactive'. An inactive vendor stays readable so historical documents still resolve, and is not offered for new ones."},"paymentTerms":{"type":"string","description":"The default payment-terms key applied to this vendor's bills, for example 'net30' or 'dueOnReceipt'. Stored as supplied."},"preferredCurrency":{"type":"string","description":"The currency the vendor prefers to be paid in. Format ISO 4217, for example 'USD'."},"preferredLanguage":{"type":"string","description":"The language the vendor prefers for messages."},"independentContractor":{"type":"string","description":"Whether the vendor is an independent contractor. Possible values: 'yes', 'no', 'unsure'."},"externalVendorId":{"type":"string","description":"The identifier this vendor has in an external system. It is not unique."},"origin":{"type":"string","description":"The source system that created the vendor, for example 'app'."},"mainContactName":{"type":"string","description":"The name of the vendor's main contact."},"mainContactEmail":{"type":"string","description":"The email address of the vendor's main contact."},"mainContactPhone":{"type":"string","description":"The phone number of the vendor's main contact."},"billingEmail":{"type":"string","description":"The email address invoices and remittance advice are sent to."},"entityId":{"type":"string","description":"The legal entity the vendor is registered under. See id on GET base/entities."},"defaultAccountId":{"type":"string","description":"The general ledger account this vendor's spend defaults to. See id on GET accounting/accounts/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","vendorName","vendorType","status","paymentTerms","lastModifiedDate"]},"rejectExpenseReportOutput":{"type":"object","properties":{"status":{"type":"string","description":"The approval status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"rejectExpenseReportInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the report is being rejected. It is recorded against the decision and shown to the submitter.","examples":["Missing receipt for the hotel line"]}},"additionalProperties":false,"required":["reviewMessage"]},"createAdvancePaymentCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the newly created advance payment category. This is the only field a write returns; read the record back with GET accounting/advance-payment-categories/{id} if you need its stored state.","examples":["b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"]}},"additionalProperties":false,"required":["id"]},"createAdvancePaymentCategoryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"Id (a UUID) of the legal entity this category belongs to. An entity has at most one advance payment category.","examples":["7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"]},"name":{"type":"string","description":"Display name of the category. Required.","examples":["Standard Advance"]},"allowManualPayment":{"type":"boolean","description":"Whether an employee may be paid this advance manually (outside the standard payment run). Omit to default to true.","examples":[true]},"status":{"type":"string","description":"Lifecycle status. Accepted values: 'active', 'inactive'. Omit to default to 'active'.","examples":["active"]}},"additionalProperties":false,"required":["entityId","name"]},"updatePurchaseOrderOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePurchaseOrderInput":{"type":"object","properties":{"vendorId":{"type":"string","description":"The vendor the order is placed with. See id on GET accounting/vendors/:id. Omit to leave unchanged."},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'. Governs every line amount. Omit to leave unchanged."},"description":{"type":"string","description":"The description of the order, shown to the vendor. Omit to leave unchanged."},"internalDescription":{"type":"string","description":"An internal description of the order, not shown to the vendor. Omit to leave unchanged."},"externalMemo":{"type":"string","description":"A memo printed on vendor-facing documents. Omit to leave unchanged."},"externalPONumber":{"type":"string","description":"The reference number this order has in the upstream system. Omit to leave unchanged."},"paymentTerms":{"type":"string","description":"The payment-terms code agreed with the vendor, for example 'net30'. Omit to leave unchanged."},"startDate":{"type":"string","format":"date","description":"The date the order starts. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","format":"date","description":"The date the order ends. Use format YYYY-MM-DD. Omit to leave unchanged."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are required by. Use format YYYY-MM-DD. Omit to leave unchanged.","examples":["2026-11-01"]},"requestedById":{"type":"string","description":"The employee who requested the order. There is no endpoint for it. Omit to leave unchanged."},"createLines":{"type":"array","items":{"type":"object","properties":{"isItem":{"type":"boolean","description":"Whether this is an item line. True for an item line, priced by quantity times price. False for an expense line, priced by editableAmount."},"description":{"type":"string","description":"A description of what is being ordered."},"itemId":{"type":"string","description":"The item being ordered. Expected on an item line."},"accountId":{"type":"string","description":"The ledger account the line is booked to. See id on GET accounting/accounts/:id. Expected on an expense line."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. Expected on an item line."},"departmentId":{"type":"string","description":"The department the cost is allocated to. See id on GET people/departments/:id."},"quantity":{"type":"string","format":"decimal","description":"The ordered quantity, as a decimal. Expected on an item line."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency, as a decimal. Expected on an item line."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, in the order currency, as a decimal. Expected on an expense line."},"startDate":{"type":"string","format":"date","description":"The date this line starts. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The date this line ends. Use format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["isItem"]},"description":"Lines to add to this order, in the same shape as on create but with no id. Omit for no additions."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this order."},"isItem":{"type":"boolean","description":"Whether this is an item line. Omit to leave unchanged."},"description":{"type":"string","description":"A description of what is being ordered. Omit to leave unchanged."},"itemId":{"type":"string","description":"The item being ordered. Omit to leave unchanged."},"accountId":{"type":"string","description":"The ledger account the line is booked to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. Omit to leave unchanged."},"departmentId":{"type":"string","description":"The department the cost is allocated to. See id on GET people/departments/:id. Omit to leave unchanged."},"quantity":{"type":"string","format":"decimal","description":"The ordered quantity, as a decimal. Omit to leave unchanged."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency, as a decimal. Omit to leave unchanged."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, in the order currency, as a decimal. Omit to leave unchanged."},"startDate":{"type":"string","format":"date","description":"The date this line starts. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","format":"date","description":"The date this line ends. Use format YYYY-MM-DD. Omit to leave unchanged."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Use format YYYY-MM-DD. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by the id the order publishes. Every field but the id is optional and omit leaves it unchanged. Omit for no changes.","examples":[[{"id":"7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9","editableAmount":"520.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of the lines to remove, applied before the updates and creates. Each must belong to this order. Removing them all is refused, so delete the order instead."}},"additionalProperties":false},"payrollDetailsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll run."},"payrollDetailNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payroll run number. Absent until a number has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the payroll run."},"periodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the payroll period this run covers, for example '2026-08'."},"payrollDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the payroll is dated. Format YYYY-MM-DD."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period the run covers. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period the run covers. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the run is denominated in. Format ISO 4217, for example 'USD'."},"grouping":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the payroll run is grouped. Values include 'Employee', 'Department' and 'Multi-level'."},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment status of the run. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"isImported":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the run was imported from a payroll provider rather than entered by hand."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the run belongs to."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the payroll run last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"expenseCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense category."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the expense category, for example 'Meals'. Unique within the tenant."},"categoryType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The kind of expense. Possible values: 'Pur', 'Dis', 'PerDiem'. 'Dis' is distance traveled."},"reimbursable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether expenses in this category are reimbursed to the employee."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle status of the expense category. Possible values: 'active', 'inactive'. An inactive category stays readable so historical expense items still resolve, and is not offered for new ones."},"requireAttachment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an expense in this category must have a receipt attachment."},"requireAttendees":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an expense in this category must list attendees."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this category has in an external system. It is not unique."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the expense category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"rejectPurchaseRequestOutput":{"type":"object","properties":{"status":{"type":"string","description":"The status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"rejectPurchaseRequestInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the request is being rejected, recorded against the approval decision. Omit for none.","examples":["Not needed this quarter"]}},"additionalProperties":false},"getAdvancePaymentCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id of the advance payment category (a UUID) — the public identifier used by this route."},"entityId":{"type":"string","description":"Id (a UUID) of the legal entity this category belongs to. An entity has at most one advance payment category."},"name":{"type":"string","description":"Display name of the category. Renaming an existing category is done by calling upsert again with the same entityId and a new name — the underlying write is a rename in place, not a new record."},"allowManualPayment":{"type":"boolean","description":"Whether an employee may be paid this advance manually (outside the standard payment run). Defaults to true."},"status":{"type":"string","description":"Lifecycle status. Possible values: 'active', 'inactive'. Defaults to 'active'."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the advance payment category last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Poll on this to sync incrementally rather than re-reading the whole collection."}},"additionalProperties":false,"required":["id","entityId","name","lastModifiedDate"]},"vendorCreditsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor credit."},"vendorCreditNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor credit number. Absent until a number has been assigned."},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor's credit memo reference number, as printed on the vendor's document."},"creditDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date on the vendor's credit memo. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the credit is denominated in. Format ISO 4217, for example 'USD'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The application status, how much of the credit has been set against vendor bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total credit amount, in currency."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this credit has in the upstream system that produced it. It is not unique."},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor this credit is from."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this credit is booked under."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the vendor credit last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"voidOutboundPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"voidOutboundPaymentInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the payment is being voided. It is stored on the payment and shown in the audit trail, and an empty or whitespace-only string is refused.","examples":["Paid the wrong vendor"]}},"additionalProperties":false,"required":["voidReason"]},"advancePaymentCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the advance payment category — the public identifier used by GET accounting/advance-payment-categories/:id. Filter e.g. filter[id][in]=<id1>,<id2>."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the legal entity this category belongs to. An entity has at most one advance payment category, so filter[entityId][eq]=<entityUuid> is the way to find 'the' category for an entity."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the category. Filter target: filter[name][like]=Standard, or filter[name][eq]=Standard Advance."},"allowManualPayment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an employee may be paid this advance manually (outside the standard payment run). Filter target: filter[allowManualPayment][eq]=true."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Lifecycle status. Possible values: 'active', 'inactive'. Filter target: filter[status][eq]=active."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Instant the advance payment category last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). filter[lastModifiedDate][gte]=… plus sort=lastModifiedDate is a complete incremental-sync cursor."}},"additionalProperties":false},"activateVendorOutput":{"type":"object","properties":{},"additionalProperties":false},"activateVendorInput":{"type":"object","properties":{},"additionalProperties":false},"deletePayrollTemplateOutput":{"type":"object","properties":{},"additionalProperties":false},"approveVendorBillOutput":{"type":"object","properties":{"status":{"type":"string","description":"The bill status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"approveVendorBillInput":{"type":"object","properties":{},"additionalProperties":false},"getEmployeeAdvanceRequestOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id of the advance request (a UUID)."},"advanceRequestNumber":{"type":"string","description":"System-generated document number (ADV-...)."},"employeeId":{"type":"string","description":"Id (a UUID) of the requesting employee."},"employeeName":{"type":"string","description":"Display name of the requesting employee."},"entityId":{"type":"string","description":"Id (a UUID) of the entity the request belongs to."},"categoryId":{"type":"string","description":"Id (a UUID) of the AdvancePaymentCategory this request draws from."},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["amount","currency"],"description":"Requested amount: the total of the request's purpose lines."},"purpose":{"type":"string","description":"What the advance is for. A request split across several purposes lists them comma-separated, e.g. 'Travel, Per Diem'."},"tripStart":{"type":"string","format":"date","description":"First day of the trip the advance covers."},"tripEnd":{"type":"string","format":"date","description":"Last day of the trip the advance covers."},"notes":{"type":"string","description":"Free-text notes from the requester."},"status":{"type":"string","description":"Lifecycle status: draft, pendingApproval, approved, rejected or issued."},"requestDate":{"type":"string","format":"date","description":"Date the request was submitted."},"decisionNote":{"type":"string","description":"Approver note recorded on approval or rejection."},"outboundPaymentId":{"type":"string","description":"Id (a UUID) of the OutboundPaymentHeaderBase created when this request was issued, if any."},"outboundPaymentHeaderNumber":{"type":"string","description":"Document number of the issued payment, if any."},"outboundPaymentApplicationStatus":{"type":"string","description":"Application status of the issued payment (unapplied/partiallyApplied/applied), if any."}},"additionalProperties":false,"required":["id","employeeId","entityId","categoryId","amount","purpose","status","requestDate"]},"updatePayrollDetailOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePayrollDetailInput":{"type":"object","properties":{"templateId":{"type":"string","description":"The payroll template this run uses. See id on GET accounting/payroll-templates/:id. Omit to leave unchanged."},"grouping":{"type":"string","description":"How the payroll is grouped. Values include 'Employee', 'Department' and 'Multi-level'. Omit to leave unchanged."},"status":{"type":"string","description":"The status of the payroll. Omit to leave unchanged."},"payrollDate":{"type":"string","format":"date","description":"The issue date of the payroll. Use format YYYY-MM-DD. Omit to leave unchanged."},"startDate":{"type":"string","format":"date","description":"The first day of the payroll period. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","format":"date","description":"The last day of the payroll period. Use format YYYY-MM-DD. Omit to leave unchanged."},"currency":{"type":"string","description":"The currency the payroll is denominated in. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"description":{"type":"string","description":"A description of the payroll. Omit to leave unchanged.","examples":["August 2026 payroll (revised)"]},"isNetPayCategoryMapped":{"type":"boolean","description":"Whether the net-pay category is matched in the account mapping. Omit to leave unchanged."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"lines":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee this line is for. There is no endpoint for it. With grouping 'Employee', a line that names an employee but no department has the department backfilled from that employee's primary job."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"lineItems":{"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","description":"The payroll category this amount belongs to. There is no endpoint for it. It must be an active category of the payroll's template, or one the payroll already uses."},"amount":{"type":"string","format":"decimal","description":"The amount for this category, as a decimal in the payroll's currency."}},"additionalProperties":false,"required":["categoryId","amount"]},"description":"The amounts on this line, one per payroll category. Each category must be reachable from the payroll's template. An item whose amount is null is dropped before the payroll is saved."}},"additionalProperties":false,"required":["lineItems"]},"description":"The complete replacement set of lines. Omit to keep the stored lines. Send an empty array to clear them. Child ids are neither published nor preserved.","examples":[[{"employeeId":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84","lineItems":[{"categoryId":"9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95","amount":"5200.00"},{"categoryId":"e5c7a390-1d64-4b28-9a07-2f8b6d4c1e53","amount":"5200.00"}]}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the uploaded file in file storage, as a text reference. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the payroll, as a complete replacement set. Omit to keep the stored attachments. Send an empty array to clear them."}},"additionalProperties":false},"searchEmployeeAdvanceRequestsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"advanceRequestNumber":{"type":"string"},"employeeId":{"type":"string"},"employeeName":{"type":"string"},"entityId":{"type":"string"},"categoryId":{"type":"string"},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["amount","currency"]},"purpose":{"type":"string"},"tripStart":{"type":"string","format":"date"},"tripEnd":{"type":"string","format":"date"},"notes":{"type":"string"},"status":{"type":"string"},"requestDate":{"type":"string","format":"date"},"decisionNote":{"type":"string"},"outboundPaymentId":{"type":"string"},"outboundPaymentHeaderNumber":{"type":"string"},"outboundPaymentApplicationStatus":{"type":"string"}},"additionalProperties":false,"required":["id","employeeId","entityId","categoryId","amount","purpose","status","requestDate"]},"description":"Matching advance requests for this page, newest first."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as page.cursor for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchEmployeeAdvanceRequestsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"status":{"type":"string","description":"Restrict to requests in this lifecycle status: draft, pendingApproval, approved, rejected or issued."},"employeeId":{"type":"string","description":"Restrict to requests from this employee (a UUID). A uuid that matches no employee returns an empty page, not an error."},"entityId":{"type":"string","description":"Restrict to requests in this entity (a UUID). A uuid that matches no entity returns an empty page, not an error."},"categoryId":{"type":"string","description":"Restrict to requests drawing from this AdvancePaymentCategory (a UUID). A uuid that matches no category returns an empty page, not an error."},"advanceRequestNumber":{"type":"string","description":"Exact match on the request's document number (ADV-...)."}},"additionalProperties":false,"description":"Search filters, nested as one object. All are optional and are ANDed; omit the whole object to match every request.","examples":[{"status":"pendingApproval"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page."},"size":{"type":"number","description":"Maximum number of requests to return. Defaults to 50, capped at 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"payrollPaymentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment."},"payrollPaymentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment number. Absent until a number has been assigned."},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is made in. Format ISO 4217, for example 'USD'. Governs totalPaid."},"paymentType":{"type":"string","description":"How the payment was made: the instrument, not the origin. Values include 'manual' and 'bank'."},"status":{"type":"string","description":"The status of the payment. Values include 'successful', 'rejected', 'cancelled', 'processing', 'partiallySuccessful', 'unknown', 'unsigned', 'manuallyRecorded', 'scheduled' and 'voided'."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status of the payment."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description recorded on the payment."},"totalPaid":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total amount paid, in paymentCurrency."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"paymentAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the general ledger account the payment is booked against."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the payroll payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchOutboundPaymentOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the outbound payment."},"outboundPaymentNumber":{"type":"string","description":"The outbound payment number. Absent until a number has been assigned."},"description":{"type":"string","description":"A description of the payment."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is denominated in. Format ISO 4217, for example 'USD'. Governs totalPaid, appliedAmount and unappliedAmount."},"paymentType":{"type":"string","description":"How the money was sent, for example 'ach', 'wire' or 'check'."},"status":{"type":"string","description":"The processing status of the payment."},"approvalStatus":{"type":"string","description":"Where the payment sits in the approval workflow."},"applicationStatus":{"type":"string","description":"How much of the payment has been applied to bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid, in the payment currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The portion already applied against vendor bills, in the payment currency."},"unappliedAmount":{"type":"string","format":"decimal","description":"The portion not yet applied to any bill, in the payment currency."},"bankCurrency":{"type":"string","description":"The currency of the bank account the money left, when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"paymentId":{"type":"string","description":"The payment reference assigned by the bank or payment provider."},"externalId":{"type":"string","description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"externalUrl":{"type":"string","description":"A link to the payment in an external system, when one is stored."},"origin":{"type":"string","description":"The source system this payment came from. Recorded when an integration created the payment."},"singlePayment":{"type":"boolean","description":"Whether the payment covers a single bill rather than a batch."},"paymentAccountId":{"type":"string","description":"The bank general ledger account the money left. See id on GET accounting/accounts/:id."},"paymentAccountName":{"type":"string","description":"The name of the bank general ledger account the money left."},"entityId":{"type":"string","description":"The legal entity that made the payment. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A description of the line."},"amount":{"type":"string","format":"decimal","description":"The amount paid on this line, in the line currency."},"currency":{"type":"string","description":"The currency for the line. Format ISO 4217, for example 'USD'."},"paymentDate":{"type":"string","format":"date","description":"The date this line was paid, when it differs from the header. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"How this line was sent, for example 'ach', 'wire' or 'check'."},"receiverName":{"type":"string","description":"The name of the payee."},"receiverAccount":{"type":"string","description":"The payee bank account number. It is returned here and on search but never on the collection endpoint and never filterable."},"receiverBankCode":{"type":"string","description":"The payee sort or routing code. It is returned here and on search but never on the collection endpoint and never filterable."},"customReference":{"type":"string","description":"A reference you supplied, carried on the line."}},"additionalProperties":false,"required":["id","description","currency","receiverName"]},"description":"The payment lines, one per payee or bill covered. An empty array when the payment has none."}},"additionalProperties":false,"required":["id","paymentDate","paymentCurrency","paymentType","status","lastModifiedDate"]},"description":"The outbound payments on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchOutboundPaymentInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the outbound payment with this identifier."},"outboundPaymentNumber":{"type":"string","description":"Limits results to the payment with this number."},"paymentId":{"type":"string","description":"Limits results to payments with this bank or provider reference."},"status":{"type":"string","description":"Limits results to payments in this processing status. Any other value matches no payment."},"approvalStatus":{"type":"string","description":"Limits results to payments in this approval state. Any other value matches no payment."},"applicationStatus":{"type":"string","description":"Limits results by how much of the payment has been applied. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"paymentType":{"type":"string","description":"Limits results to payments sent this way, for example 'ach', 'wire' or 'check'."},"paymentCurrency":{"type":"string","description":"Limits results to payments denominated in this currency. Format ISO 4217, for example 'USD'."},"paymentAccountId":{"type":"string","description":"Limits results to payments made from this bank general ledger account. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"Limits results to payments made by this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to payments made by the legal entity with this name. The match is exact. Use entityId when you already have the id."},"origin":{"type":"string","description":"Limits results to payments created by this source system. The match is exact."},"externalId":{"type":"string","description":"Limits results to payments with this upstream identifier. It is not unique, so this can match several payments."}},"additionalProperties":false,"description":"The filters to apply. An outbound payment must match every filter you send. Omit to return all outbound payments.","examples":[{"applicationStatus":"unapplied"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of payments per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"getPayrollPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment. The same record is also readable as an outbound payment under this id."},"payrollPaymentNumber":{"type":"string","description":"The payment number. Absent until a number has been assigned."},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is made in. Format ISO 4217, for example 'USD'. Governs totalPaid and every application amount."},"paymentType":{"type":"string","description":"How the payment was made: the instrument, not the origin. Values include 'manual' and 'bank'."},"status":{"type":"string","description":"The status of the payment. Values include 'successful', 'rejected', 'cancelled', 'processing', 'partiallySuccessful', 'unknown', 'unsigned', 'manuallyRecorded', 'scheduled' and 'voided'."},"approvalStatus":{"type":"string","description":"The approval status of the payment."},"description":{"type":"string","description":"A description recorded on the payment."},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid, in paymentCurrency."},"externalId":{"type":"string","description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"paymentAccountId":{"type":"string","description":"The general ledger account the payment is booked against. See id on GET accounting/accounts/:id."},"paymentAccountName":{"type":"string","description":"The name of the general ledger account the payment is booked against."},"entityId":{"type":"string","description":"The legal entity that made the payment. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment application."},"applicationNumber":{"type":"string","description":"The application number."},"description":{"type":"string","description":"A description of the application."},"amountPaid":{"type":"string","format":"decimal","description":"The amount paid by this application, as a decimal in currency."},"currency":{"type":"string","description":"The currency governing amountPaid, the payroll run's currency. Format ISO 4217, for example 'USD'."},"paymentStatus":{"type":"string","description":"The status of the paying payment item, mirrored onto the application. It uses the same values as the payment's status."},"payrollDetailId":{"type":"string","description":"The payroll detail this application settles. See id on GET accounting/payroll-details/:id."},"accountId":{"type":"string","description":"The general ledger account this application is booked against. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the general ledger account this application is booked against."},"accountNumber":{"type":"string","description":"The number of the general ledger account this application is booked against."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration, for example 'employee' or 'taxOffice'."},"payeeLabel":{"type":"string","description":"The display label for the payee."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a vendor. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor being paid."},"employeeId":{"type":"string","description":"The employee being paid, when the payee is an employee. There is no endpoint for it."},"employeeName":{"type":"string","description":"The name of the employee being paid."}},"additionalProperties":false,"required":["id"]},"description":"The payroll payment applications, each tying part of this payment to one payroll detail and one payee. An empty array when the payment has none."}},"additionalProperties":false,"required":["id","paymentDate","paymentCurrency","paymentType","status","lastModifiedDate"]},"approveEmployeeAdvanceRequestOutput":{"type":"object","properties":{"status":{"type":"string","description":"Status after the operation. The workflow decides it, so it is read back rather than assumed.","examples":["approved"]}},"additionalProperties":false,"required":["status"]},"approveEmployeeAdvanceRequestInput":{"type":"object","properties":{},"additionalProperties":false},"updateVendorCreditOutput":{"type":"object","properties":{},"additionalProperties":false},"updateVendorCreditInput":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The vendor's credit memo reference number, as printed on the document. Omit to leave unchanged.","examples":["CN-4471-A"]},"creditDate":{"type":"string","format":"date","description":"The date on the vendor's credit memo. Use format YYYY-MM-DD. Omit to leave unchanged."},"currency":{"type":"string","description":"The currency of the credit. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"createLines":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The gross credit amount for the line, as a decimal in the credit currency."},"description":{"type":"string","description":"A description of the credit line."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is allocated to. There is no endpoint for it."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 19 means 19%, not 0.19."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the credit currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'expense' (a one-time credit) or 'prepaid' (a credit spread over several periods). Defaults to 'expense'."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. A new line has nothing to change or remove, so this is a plain array, the same shape POST accounting/vendor-credits takes."}},"additionalProperties":false,"required":["amount"]},"description":"Lines to add to the credit, each with the same shape as on create and no id. Omit for no additions."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this credit."},"amount":{"type":"string","format":"decimal","description":"The gross credit amount for the line, as a decimal in the credit currency. Omit to leave unchanged."},"description":{"type":"string","description":"A description of the credit line. Omit to leave unchanged."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id. Omit to leave unchanged."},"businessUnitId":{"type":"string","description":"The business unit this line is allocated to. There is no endpoint for it. Omit to leave unchanged."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 19 means 19%, not 0.19. Omit to leave unchanged."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the credit currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it. Omit to leave unchanged."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'expense' (a one-time credit) or 'prepaid' (a credit spread over several periods). Omit to leave unchanged."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the accountId sent on this updateLines item. If that item doesn't send accountId, send deferredAccountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this line, each with no id. Omit for no additions. Send none of the three amortization arrays to leave this line's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the schedule to change. It must be one this line already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit to leave unchanged."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Omit to leave unchanged, unless this updateLines item also sends accountId, in which case it is set to that account."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'. Omit to leave unchanged."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. Omit to leave unchanged."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD. Omit to leave unchanged."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Omit to leave unchanged."},"description":{"type":"string","description":"A note to record against the schedule. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by the id the credit publishes. A schedule that has already started recognizing is refused with AMORTIZATION_SCHEDULE_POSTED. Omit for no changes."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this line. Each must be one this line carries, and one that has not started recognizing. Removing a schedule leaves this line's other books untouched."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by the id the credit publishes. Every field but the id is optional and left unchanged when omitted. Omit for no changes.","examples":[[{"id":"6b2a9f18-7c3d-4e5a-8b19-2d4e6f8a0c31","amount":"350.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove, applied before the updates and creates. Each must belong to this credit. Removing a line also removes the amortization schedules it carried."}},"additionalProperties":false},"getExpenseReportOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense report."},"expenseNumber":{"type":"string","description":"The expense number. Absent until one has been assigned."},"status":{"type":"string","description":"The approval status of the report. Values include 'draft', 'pendingApproval', 'approved', 'rejected' and 'paid'."},"paymentStatus":{"type":"string","description":"The payment status of the report. Absent until a payment run has touched it."},"submittedDate":{"type":"string","format":"date","description":"The date the employee submitted the report for approval. Format YYYY-MM-DD. Absent while the report is still a draft."},"reimbursementCurrency":{"type":"string","description":"The currency the report is reimbursed in. Format ISO 4217, for example 'USD'. Governs every header total below."},"reimbursableTotal":{"type":"string","format":"decimal","description":"The total reimbursable amount across the report's items, in reimbursementCurrency."},"reimbursableTotalNetAmount":{"type":"string","format":"decimal","description":"The total reimbursable amount excluding VAT, in reimbursementCurrency."},"amountPaid":{"type":"string","format":"decimal","description":"The amount already reimbursed to the employee, in reimbursementCurrency."},"openAmount":{"type":"string","format":"decimal","description":"The amount still owed to the employee, reimbursableTotal minus amountPaid, in reimbursementCurrency."},"pendingAmount":{"type":"string","format":"decimal","description":"The amount committed to an in-flight payment run but not yet paid, in reimbursementCurrency."},"containsBillableItem":{"type":"boolean","description":"Whether at least one item on the report is marked billable to a customer."},"markAsPaid":{"type":"boolean","description":"Whether the report was flagged as paid without going through a payment run."},"pendingPayment":{"type":"boolean","description":"Whether a payment for this report is in flight."},"skipJournalEntry":{"type":"boolean","description":"Whether the report is configured not to post a journal entry."},"reviewMessage":{"type":"string","description":"The reviewer's note left on approval or rejection."},"externalUrl":{"type":"string","description":"A link to the report in the upstream system that produced it."},"externalExpenseReportId":{"type":"string","description":"The identifier this report has in the upstream system that produced it. It is not unique."},"origin":{"type":"string","description":"The source system this report came from, as free-form text."},"employeeId":{"type":"string","description":"The employee the report belongs to. See id on GET people/person/:id."},"employeeName":{"type":"string","description":"The name of the employee the report belongs to."},"entityId":{"type":"string","description":"The legal entity the report is posted under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the report is posted under."},"departmentId":{"type":"string","description":"The department the report is charged to. See id on GET people/departments/:id."},"offsetAccountId":{"type":"string","description":"The GL offset account for the reimbursement. See id on GET accounting/accounts/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the expense report last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"approvals":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","description":"What was decided. Values include 'approve' and 'reject'."},"employeeName":{"type":"string","description":"The name of the employee who decided."},"message":{"type":"string","description":"The reviewer's note, where one was given."},"decidedAt":{"type":"string","format":"date-time","description":"The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["decision","decidedAt"]},"description":"The approval decisions on this report, oldest first. An empty array when no approval policy has matched the report."},"expenseItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense item."},"itemNumber":{"type":"string","description":"The expense item number."},"merchant":{"type":"string","description":"The merchant the expense was incurred with."},"billDate":{"type":"string","format":"date","description":"The date the expense was incurred. Format YYYY-MM-DD."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense item."},"amount":{"type":"string","format":"decimal","description":"The amount of the expense item, as a decimal in the item's own currency."},"currency":{"type":"string","description":"The currency this item's amount is in. Format ISO 4217, for example 'USD'. May differ from the report's reimbursementCurrency."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursable to the employee."},"categoryId":{"type":"string","description":"The expense category the item is booked to. See id on GET accounting/expense-categories/:id."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the attachment record."},"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the stored file. There is no endpoint for it."}},"additionalProperties":false,"required":["id"]},"description":"The receipts on this item."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted report reads 'notStarted' until the report posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in this item's currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this item is deferred over, one per accounting book. Absent when the item is not amortized. An expense item has no line type, so what makes it amortizable is its account: the category or account it books to must be a prepaid-expenses account. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The expense items on the report, in their order on it. An empty array when the report has none."}},"additionalProperties":false,"required":["id","status","reimbursementCurrency","lastModifiedDate"]},"deleteExpenseReportOutput":{"type":"object","properties":{},"additionalProperties":false},"searchExpenseCategoryOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense category."},"category":{"type":"string","description":"The display name of the expense category, for example 'Meals'. Unique within the tenant."},"categoryType":{"type":"string","description":"The kind of expense. Possible values: 'Pur', 'Dis', 'PerDiem'. 'Dis' is distance traveled."},"reimbursable":{"type":"boolean","description":"Whether expenses in this category are reimbursed to the employee."},"status":{"type":"string","description":"The lifecycle status of the expense category. Possible values: 'active', 'inactive'. An inactive category stays readable so historical expense items still resolve, and is not offered for new ones."},"requireAttachment":{"type":"boolean","description":"Whether an expense in this category must have a receipt attachment."},"requireAttendees":{"type":"boolean","description":"Whether an expense in this category must list attendees."},"externalId":{"type":"string","description":"The identifier this category has in an external system. It is not unique."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the expense category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","category","reimbursable","lastModifiedDate"]},"description":"The expense categories on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchExpenseCategoryInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the category with this identifier."},"category":{"type":"string","description":"Limits results to the category with this exact name, for example 'Meals'. The name is unique within the tenant, so this returns at most one category. The match is case-sensitive."},"categoryType":{"type":"string","description":"Limits results to categories of this kind. Accepted values: 'Pur', 'Dis', 'PerDiem'. Any other value matches no category."},"status":{"type":"string","description":"Limits results to categories in this lifecycle status. Accepted values: 'active', 'inactive'. Any other value matches no category."},"externalId":{"type":"string","description":"Limits results to categories with this external identifier. It is not unique, so this can return several categories."}},"additionalProperties":false,"description":"The filters to apply. A category must match every filter you send. Omit to return all expense categories.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of expense categories per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"getPayrollDetailOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll run."},"payrollDetailNumber":{"type":"string","description":"The payroll run number. Absent until a number has been assigned."},"description":{"type":"string","description":"A description of the payroll run."},"periodName":{"type":"string","description":"The name of the payroll period this run covers, for example '2026-08'."},"payrollDate":{"type":"string","format":"date","description":"The date the payroll is dated. Format YYYY-MM-DD."},"startDate":{"type":"string","format":"date","description":"The first day of the period the run covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the run covers. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the run is denominated in. Format ISO 4217, for example 'USD'. Governs openAmount and every line amount."},"grouping":{"type":"string","description":"How the payroll run is grouped. Values include 'Employee', 'Department' and 'Multi-level'."},"paymentStatus":{"type":"string","description":"The payment status of the run. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"openAmount":{"type":"string","format":"decimal","description":"The amount still unpaid on this run, in currency."},"isImported":{"type":"boolean","description":"Whether the run was imported from a payroll provider rather than entered by hand."},"entityId":{"type":"string","description":"The legal entity the run belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the run belongs to."},"templateId":{"type":"string","description":"The payroll template this run was created from. See id on GET accounting/payroll-templates/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll run last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"lineLevel":{"type":"string","description":"The level this line sits at."},"employeeName":{"type":"string","description":"The name of the employee this line pays."},"unmatchedEmployeeName":{"type":"string","description":"The employee name as it arrived from the payroll provider when it matched no employee on file."},"departmentName":{"type":"string","description":"The name of the department this line is charged to."},"departmentCode":{"type":"string","description":"The code of that department."},"departmentNumber":{"type":"string","description":"The number of that department."},"totalAmount":{"type":"string","format":"decimal","description":"The total amount on the line, in the run currency."},"totalGrossAmount":{"type":"string","format":"decimal","description":"The gross pay on the line, in the run currency."},"totalNetAmount":{"type":"string","format":"decimal","description":"The net pay on the line, in the run currency."},"totalEmployerAmount":{"type":"string","format":"decimal","description":"The employer-side contributions on the line, in the run currency."},"errorMessage":{"type":"string","description":"Why this line could not be processed, when it failed."}},"additionalProperties":false,"required":["id"]},"description":"The payroll lines, one per employee or department depending on grouping. An empty array when the run has none."}},"additionalProperties":false,"required":["id","payrollDate","currency","lastModifiedDate"]},"deleteVendorBillOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePayrollPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePayrollPaymentInput":{"type":"object","properties":{"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Use format YYYY-MM-DD. Omit to leave unchanged."},"paymentCurrency":{"type":"string","description":"The currency of the payment. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"paymentStatus":{"type":"string","description":"The status of the payment, for example 'manuallyRecorded' or 'scheduled'. Omit to leave unchanged."},"paymentType":{"type":"string","description":"How the payment is made. Values include 'manual' and 'bank'. Omit to leave unchanged."},"accountId":{"type":"string","description":"The bank or cash account the payment is drawn from. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"commonDescription":{"type":"string","description":"A description applied to the payment as a whole. Omit to leave unchanged.","examples":["August payroll run (revised)"]},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"createApplications":{"type":"array","items":{"type":"object","properties":{"payrollDetailId":{"type":"string","description":"The payroll detail being paid. See id on GET accounting/payroll-details/:id."},"accountId":{"type":"string","description":"The account the payment is booked against. See id on GET accounting/accounts/:id."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration, for example 'employee' or 'taxOffice'."},"amountPaid":{"type":"string","format":"decimal","description":"The amount applied to this payroll detail, as a decimal in the payment's currency."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a third party. See id on GET accounting/vendors/:id."},"employeeId":{"type":"string","description":"The employee being paid. There is no endpoint for it."},"description":{"type":"string","description":"A description for this application."}},"additionalProperties":false,"required":["payrollDetailId","accountId","payeeCode","amountPaid"]},"description":"Applications to add to this payment, each with the same shape as on create and no id. Omit for no additions."},"updateApplications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the application to change. It must belong to this payment."},"payrollDetailId":{"type":"string","description":"The payroll detail being paid. See id on GET accounting/payroll-details/:id. Omit to leave unchanged."},"accountId":{"type":"string","description":"The account the payment is booked against. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration. Omit to leave unchanged."},"amountPaid":{"type":"string","format":"decimal","description":"The amount applied to this payroll detail, as a decimal. Omit to leave unchanged."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a third party. See id on GET accounting/vendors/:id."},"employeeId":{"type":"string","description":"The employee being paid. There is no endpoint for it."},"description":{"type":"string","description":"A description for this application."}},"additionalProperties":false,"required":["id"]},"description":"Applications to change, each addressed by the id this payment publishes. Every field but the id is optional and left unchanged when omitted. Omit for no changes.","examples":[[{"id":"9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95","amountPaid":"12750.00"}]]},"deleteApplications":{"type":"array","items":{"type":"string"},"description":"The identifiers of applications to remove, applied before the updates and creates. Each must belong to this payment. Removing them all is refused. Delete the payment instead."}},"additionalProperties":false},"depreciationSchedulesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation schedule.","examples":["7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39"]},"scheduleNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation schedule number. Unique within the tenant. Example: 'DS-0042'.","examples":["DS-0042"]},"fixedAssetId":{"type":"number","description":"The internal number of the fixed asset the schedule depreciates. It is not the `id` that the fixed asset endpoints use.","examples":[3187]},"entityId":{"type":"number","description":"The internal number of the legal entity that owns the fixed asset. It is not the `id` that the legal entity endpoints use.","examples":[1]},"bookId":{"type":"number","description":"The internal number of the accounting book the fixed asset is tracked in. It is not the `id` that the accounting book endpoints use, or the `bookId` on a depreciation policy.","examples":[1]},"depreciationRuleId":{"type":"number","description":"The internal number of the depreciation rule applied to the fixed asset. A rule links a depreciation policy to a fixed asset type and sets the useful life.","examples":[12]},"status":{"type":"string","description":"The status of the schedule. Possible values: 'NotStarted' (no line has been recorded), 'Ongoing' (some lines have been recorded), 'Completed' (every line has been recorded), 'Disposed' (the fixed asset was disposed of), 'Voided' (the fixed asset was voided).","examples":["Ongoing"]},"acquisitionDate":{"type":"string","format":"date","description":"The date the fixed asset was acquired. Format: YYYY-MM-DD. It can be earlier than startDate.","examples":["2024-01-15"]},"startDate":{"type":"string","format":"date","description":"The date depreciation starts. Format: YYYY-MM-DD.","examples":["2024-02-01"]},"endDate":{"type":"string","format":"date","description":"The last day of depreciation. Format: YYYY-MM-DD.","examples":["2029-01-31"]},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"acquisitionValue":{"type":"string","format":"decimal","description":"The acquisition cost of the fixed asset, in the `currency`.","examples":["24000.00"]},"depreciableAmount":{"type":"string","format":"decimal","description":"The total amount to depreciate over the schedule, in the `currency`. Formula: the fixed asset's depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValue - salvageValueAmount. See depreciationStartValueAmount and salvageValueAmount on GET fixed-assets/:id.","examples":["21600.00"]},"depreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation recorded on this schedule, in the `currency`. Formula: the sum of the recorded schedule lines. Lines that have not been recorded do not count, whatever their dates.","examples":["7560.00"]},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValue - depreciatedAmount, or when the fixed asset has a depreciationStartValueAmount, depreciationStartValueAmount - depreciatedAmount. It is 0 once the fixed asset is voided, retired, or disposed of.","examples":["16440.00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation schedule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Recording depreciation changes depreciatedAmount and remainingValue. It updates lastModifiedDate only when the schedule's status changes.","examples":["2026-08-14T09:12:33.000Z"]}},"additionalProperties":false},"searchDepreciationPoliciesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation policy."},"depreciationPolicyNumber":{"type":"string","description":"The depreciation policy number. Unique within the tenant. Example: 'DP-0007'."},"name":{"type":"string","description":"The name of the depreciation policy. Unique within the tenant."},"description":{"type":"string","description":"A description of the depreciation policy."},"depreciationMethod":{"type":"string","description":"The method used to spread depreciation over an asset's useful life. When a fixed asset of one of these types is set up, it takes this method. The method can then be changed on the fixed asset. Possible values: 'StraightLine' (equal amounts each period), 'Degressive' (declining balance at the fixed asset's annual `degressionRate`, switching to straight line when that gives a higher amount), 'Immediate' (the whole depreciable amount in the first period), 'Bypassed' (no depreciation schedule is created). How the method treats time is `depreciationConvention`."},"depreciationConvention":{"type":"string","description":"How the method treats time: how the first and last periods are measured and how an amount is spread across periods. Possible values: 'FullMonth' (the in-service month counts as a full month; every period takes an equal share), 'MidMonth' (in service on or before the 15th: the full first month; after the 15th: depreciation starts the following month), 'MidYear' (year one and the year after the useful life each take half the annual amount), 'SixMonthRule' (the full annual amount in year one when in service more than six months of the fiscal year, otherwise half of it), 'ProrateFirstLast' (the partial first and last periods are prorated by days), 'ActualDays' (every period is weighted by its actual number of days). Present for 'StraightLine' (any value) and 'Degressive' (only 'FullMonth'); absent for 'Immediate' and 'Bypassed', which take none."},"depreciationInterval":{"type":"string","description":"The length of each depreciation period. Possible values: 'Monthly', 'Quarterly', 'Yearly'."},"bookId":{"type":"string","description":"The accounting book the depreciation policy applies to. A policy applies to one book only, so each book needs its own policies. See id on GET accounting/books/:id. Absent when the book no longer exists."},"assetAccountId":{"type":"string","description":"The balance sheet account that holds the cost of fixed assets under this policy. Disposing of a fixed asset credits its acquisition value to this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"accumulatedDepreciationAccountId":{"type":"string","description":"The accumulated depreciation account, a contra-asset account. Recording depreciation credits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"depreciationExpenseAccountId":{"type":"string","description":"The depreciation expense account. Recording depreciation debits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"gainAccountId":{"type":"string","description":"The account for gains when an asset under this policy is sold for more than its net book value. It is used only on books that keep gains and losses in separate accounts, such as HGB books. On such a sale, the asset's net book value and the sale amount go to this account. If the fixed asset has a `revenueAccountId`, the sale amount goes there instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"lossAccountId":{"type":"string","description":"The account for losses when an asset under this policy is disposed of. The asset's net book value goes to this account. On a sale, the sale amount also goes here, unless the fixed asset has a `revenueAccountId`. On books that keep gains and losses in separate accounts, a sale for more than the net book value goes to `gainAccountId` instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"active":{"type":"boolean","description":"Whether the depreciation policy is active. Only active policies are offered when a fixed asset type is chosen for a fixed asset. Depreciation already scheduled under an inactive policy is still recorded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation policy last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","depreciationMethod","depreciationInterval","lastModifiedDate"]},"description":"The depreciation policies on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5","depreciationPolicyNumber":"DP-0007","name":"Office Equipment — 5 Year Straight Line","description":"Standard straight-line write-down for office equipment over five years.","depreciationMethod":"StraightLine","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"3a5f81c6-9d24-4b70-8e15-6c2b7f094d38","accumulatedDepreciationAccountId":"9e14d7b2-6c83-4f51-a027-8d3b5e199c61","depreciationExpenseAccountId":"5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-14T09:12:33.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more depreciation policies match after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether more depreciation policies match, and the cursor for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchDepreciationPoliciesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the depreciation policy with this id. The match is exact."},"depreciationPolicyNumber":{"type":"string","description":"Limits results to the policy with this policy number. The match is exact. Example: 'DP-0007'."},"name":{"type":"string","description":"Limits results to the policy with this name. The match is exact and case-sensitive. When sent, nameContains is ignored."},"nameContains":{"type":"string","description":"Limits results to policies whose name contains this text. The match is case-insensitive, and % and _ match as ordinary characters. Ignored if the request also includes the name filter."},"descriptionContains":{"type":"string","description":"Limits results to policies whose description contains this text. The match is case-insensitive, and % and _ match as ordinary characters. A policy with no description never matches."},"bookIds":{"type":"array","items":{"type":"string"},"description":"Limits results to policies that apply to any of these accounting books. The match is exact. See id on GET accounting/books/:id."}},"additionalProperties":false,"description":"The filters to apply. A policy must match every filter you send. Omit to return all depreciation policies. If you send an empty list for a filter, that filter is ignored.","examples":[{"nameContains":"equipment","bookIds":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of depreciation policies per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, and a value below 1 as 1, not rejected."}},"additionalProperties":false,"description":"The page of results to return. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"getDepreciationPolicyOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation policy.","examples":["b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5"]},"depreciationPolicyNumber":{"type":"string","description":"The depreciation policy number. Unique within the tenant. Example: 'DP-0007'.","examples":["DP-0007"]},"name":{"type":"string","description":"The name of the depreciation policy. Unique within the tenant.","examples":["Office Equipment — 5 Year Straight Line"]},"description":{"type":"string","description":"A description of the depreciation policy.","examples":["Standard straight-line write-down for office equipment over five years."]},"depreciationMethod":{"type":"string","description":"The method used to spread depreciation over an asset's useful life. When a fixed asset of one of these types is set up, it takes this method. The method can then be changed on the fixed asset. Possible values: 'StraightLine' (equal amounts each period), 'Degressive' (declining balance at the fixed asset's annual `degressionRate`, switching to straight line when that gives a higher amount), 'Immediate' (the whole depreciable amount in the first period), 'Bypassed' (no depreciation schedule is created). How the method treats time is `depreciationConvention`.","examples":["StraightLine"]},"depreciationConvention":{"type":"string","description":"How the method treats time: how the first and last periods are measured and how an amount is spread across periods. Possible values: 'FullMonth' (the in-service month counts as a full month; every period takes an equal share), 'MidMonth' (in service on or before the 15th: the full first month; after the 15th: depreciation starts the following month), 'MidYear' (year one and the year after the useful life each take half the annual amount), 'SixMonthRule' (the full annual amount in year one when in service more than six months of the fiscal year, otherwise half of it), 'ProrateFirstLast' (the partial first and last periods are prorated by days), 'ActualDays' (every period is weighted by its actual number of days). Present for 'StraightLine' (any value) and 'Degressive' (only 'FullMonth'); absent for 'Immediate' and 'Bypassed', which take none.","examples":["FullMonth"]},"depreciationInterval":{"type":"string","description":"The length of each depreciation period. Possible values: 'Monthly', 'Quarterly', 'Yearly'.","examples":["Monthly"]},"bookId":{"type":"string","description":"The accounting book the depreciation policy applies to. A policy applies to one book only, so each book needs its own policies. See id on GET accounting/books/:id. Absent when the book no longer exists.","examples":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]},"assetAccountId":{"type":"string","description":"The balance sheet account that holds the cost of fixed assets under this policy. Disposing of a fixed asset credits its acquisition value to this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["3a5f81c6-9d24-4b70-8e15-6c2b7f094d38"]},"accumulatedDepreciationAccountId":{"type":"string","description":"The accumulated depreciation account, a contra-asset account. Recording depreciation credits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["9e14d7b2-6c83-4f51-a027-8d3b5e199c61"]},"depreciationExpenseAccountId":{"type":"string","description":"The depreciation expense account. Recording depreciation debits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5"]},"gainAccountId":{"type":"string","description":"The account for gains when an asset under this policy is sold for more than its net book value. It is used only on books that keep gains and losses in separate accounts, such as HGB books. On such a sale, the asset's net book value and the sale amount go to this account. If the fixed asset has a `revenueAccountId`, the sale amount goes there instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04"]},"lossAccountId":{"type":"string","description":"The account for losses when an asset under this policy is disposed of. The asset's net book value goes to this account. On a sale, the sale amount also goes here, unless the fixed asset has a `revenueAccountId`. On books that keep gains and losses in separate accounts, a sale for more than the net book value goes to `gainAccountId` instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a"]},"active":{"type":"boolean","description":"Whether the depreciation policy is active. Only active policies are offered when a fixed asset type is chosen for a fixed asset. Depreciation already scheduled under an inactive policy is still recorded.","examples":[true]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation policy last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.000Z"]}},"additionalProperties":false,"required":["id","name","depreciationMethod","depreciationInterval","lastModifiedDate"]},"depreciationPoliciesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation policy.","examples":["b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5"]},"depreciationPolicyNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation policy number. Unique within the tenant. Example: 'DP-0007'.","examples":["DP-0007"]},"name":{"type":"string","description":"The name of the depreciation policy. Unique within the tenant.","examples":["Office Equipment — 5 Year Straight Line"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the depreciation policy.","examples":["Standard straight-line write-down for office equipment over five years."]},"depreciationMethod":{"type":"string","description":"The method used to spread depreciation over an asset's useful life. When a fixed asset of one of these types is set up, it takes this method. The method can then be changed on the fixed asset. Possible values: 'StraightLine' (equal amounts each period), 'Degressive' (declining balance at the fixed asset's annual `degressionRate`, switching to straight line when that gives a higher amount), 'Immediate' (the whole depreciable amount in the first period), 'Bypassed' (no depreciation schedule is created). How the method treats time is `depreciationConvention`.","examples":["StraightLine"]},"depreciationConvention":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the method treats time: how the first and last periods are measured and how an amount is spread across periods. Possible values: 'FullMonth' (the in-service month counts as a full month; every period takes an equal share), 'MidMonth' (in service on or before the 15th: the full first month; after the 15th: depreciation starts the following month), 'MidYear' (year one and the year after the useful life each take half the annual amount), 'SixMonthRule' (the full annual amount in year one when in service more than six months of the fiscal year, otherwise half of it), 'ProrateFirstLast' (the partial first and last periods are prorated by days), 'ActualDays' (every period is weighted by its actual number of days). Present for 'StraightLine' (any value) and 'Degressive' (only 'FullMonth'); absent for 'Immediate' and 'Bypassed', which take none.","examples":["FullMonth"]},"depreciationInterval":{"type":"string","description":"The length of each depreciation period. Possible values: 'Monthly', 'Quarterly', 'Yearly'.","examples":["Monthly"]},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting book the depreciation policy applies to. A policy applies to one book only, so each book needs its own policies. See id on GET accounting/books/:id. Absent when the book no longer exists.","examples":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]},"assetAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The balance sheet account that holds the cost of fixed assets under this policy. Disposing of a fixed asset credits its acquisition value to this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["3a5f81c6-9d24-4b70-8e15-6c2b7f094d38"]},"accumulatedDepreciationAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accumulated depreciation account, a contra-asset account. Recording depreciation credits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["9e14d7b2-6c83-4f51-a027-8d3b5e199c61"]},"depreciationExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation expense account. Recording depreciation debits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5"]},"gainAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account for gains when an asset under this policy is sold for more than its net book value. It is used only on books that keep gains and losses in separate accounts, such as HGB books. On such a sale, the asset's net book value and the sale amount go to this account. If the fixed asset has a `revenueAccountId`, the sale amount goes there instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04"]},"lossAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account for losses when an asset under this policy is disposed of. The asset's net book value goes to this account. On a sale, the sale amount also goes here, unless the fixed asset has a `revenueAccountId`. On books that keep gains and losses in separate accounts, a sale for more than the net book value goes to `gainAccountId` instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the depreciation policy is active. Only active policies are offered when a fixed asset type is chosen for a fixed asset. Depreciation already scheduled under an inactive policy is still recorded.","examples":[true]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation policy last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.000Z"]}},"additionalProperties":false},"getDepreciationScheduleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation schedule.","examples":["7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39"]},"scheduleNumber":{"type":"string","description":"The depreciation schedule number. Unique within the tenant. Example: 'DS-0042'.","examples":["DS-0042"]},"fixedAssetId":{"type":"number","description":"The internal number of the fixed asset the schedule depreciates. It is not the `id` that the fixed asset endpoints use.","examples":[3187]},"entityId":{"type":"number","description":"The internal number of the legal entity that owns the fixed asset. It is not the `id` that the legal entity endpoints use.","examples":[1]},"bookId":{"type":"number","description":"The internal number of the accounting book the fixed asset is tracked in. It is not the `id` that the accounting book endpoints use, or the `bookId` on a depreciation policy.","examples":[1]},"depreciationRuleId":{"type":"number","description":"The internal number of the depreciation rule applied to the fixed asset. A rule links a depreciation policy to a fixed asset type and sets the useful life.","examples":[12]},"status":{"type":"string","description":"The status of the schedule. Possible values: 'NotStarted' (no line has been recorded), 'Ongoing' (some lines have been recorded), 'Completed' (every line has been recorded), 'Disposed' (the fixed asset was disposed of), 'Voided' (the fixed asset was voided).","examples":["Ongoing"]},"acquisitionDate":{"type":"string","format":"date","description":"The date the fixed asset was acquired. Format: YYYY-MM-DD. It can be earlier than startDate.","examples":["2024-01-15"]},"startDate":{"type":"string","format":"date","description":"The date depreciation starts. Format: YYYY-MM-DD.","examples":["2024-02-01"]},"endDate":{"type":"string","format":"date","description":"The last day of depreciation. Format: YYYY-MM-DD.","examples":["2029-01-31"]},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"acquisitionValue":{"type":"string","format":"decimal","description":"The acquisition cost of the fixed asset, in the `currency`.","examples":["24000.00"]},"depreciableAmount":{"type":"string","format":"decimal","description":"The total amount to depreciate over the schedule, in the `currency`. Formula: the fixed asset's depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValue - salvageValueAmount. See depreciationStartValueAmount and salvageValueAmount on GET fixed-assets/:id.","examples":["21600.00"]},"depreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation recorded on this schedule, in the `currency`. Formula: the sum of the recorded schedule lines. Lines that have not been recorded do not count, whatever their dates.","examples":["7560.00"]},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValue - depreciatedAmount, or when the fixed asset has a depreciationStartValueAmount, depreciationStartValueAmount - depreciatedAmount. It is 0 once the fixed asset is voided, retired, or disposed of.","examples":["16440.00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation schedule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Recording depreciation changes depreciatedAmount and remainingValue. It updates lastModifiedDate only when the schedule's status changes.","examples":["2026-08-14T09:12:33.000Z"]}},"additionalProperties":false,"required":["id","fixedAssetId","entityId","bookId","depreciationRuleId","status","acquisitionDate","startDate","endDate","currency","acquisitionValue","depreciableAmount","depreciatedAmount","remainingValue","lastModifiedDate"]},"getFixedAssetOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed asset.","examples":["9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915"]},"fixedAssetNumber":{"type":"string","description":"The fixed asset number. Unique within the tenant. Each book's fixed asset has its own number, unlike assetNumber, which is the same in every book. Example: 'FA-1'.","examples":["FA-000142"]},"fixedAssetStatus":{"type":"string","description":"The status of the fixed asset. Possible values: 'active', 'voided'. Voided fixed assets are returned here, unlike on `GET fixed-assets`.","examples":["active"]},"companyAssetId":{"type":"string","description":"The asset this fixed asset records. Fixed assets of the same asset in different books have the same companyAssetId.","examples":["3a7e5c81-9b24-4d0f-8e63-1c95af207b48"]},"name":{"type":"string","description":"The name of the asset.","examples":["Forklift - Warehouse 2"]},"entityId":{"type":"string","description":"The legal entity that owns the asset. See id on GET base/entities.","examples":["c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9"]},"assetStatus":{"type":"string","description":"The physical status of the asset. Possible values: 'available', 'broken', 'inRepair', 'inUse', 'retired', 'disposed'. Disposing of an asset sets assetStatus to 'disposed' and leaves fixedAssetStatus as 'active'.","examples":["inUse"]},"assetNumber":{"type":"string","description":"The asset number. It is unique within the tenant, and all fixed assets of the same asset have the same number.","examples":["CA-0881"]},"serialNumber":{"type":"string","description":"The serial number of the asset. It is free text and does not have to be unique.","examples":["SN-77120934"]},"assetTag":{"type":"string","description":"The asset tag of the asset, such as the code on a label attached to it. It is free text.","examples":["WH2-FORK-03"]},"acquisitionDate":{"type":"string","format":"date","description":"The date the asset was acquired. Format: YYYY-MM-DD.","examples":["2024-03-11"]},"departmentId":{"type":"string","description":"The department the asset is assigned to. Absent when the asset has no department. See id on GET people/departments/:id.","examples":["5c8a2b70-1e94-4f37-8d06-b3e75f1290ac"]},"businessUnitId":{"type":"string","description":"The business unit the asset is assigned to. Absent when the asset has no business unit."},"typeId":{"type":"string","description":"The type of the fixed asset.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]},"typeName":{"type":"string","description":"The name of the fixed asset type. Example: 'Machinery'.","examples":["Machinery"]},"bookId":{"type":"string","description":"The accounting book the fixed asset is recorded in. See id on GET accounting/books/:id.","examples":["e0c37a94-2d15-4b86-9f42-5a7c81de03b6"]},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"inServiceDate":{"type":"string","format":"date","description":"The date the asset was placed in service. The depreciation schedule is calculated from this date. Format: YYYY-MM-DD.","examples":["2024-04-01"]},"depreciationMethod":{"type":"string","description":"The depreciation method of the fixed asset. Possible values: 'StraightLine', 'StraightLineProRateFirstLast', 'Degressive', 'Immediate', 'Bypassed', 'StraightLineHalfMonth', 'ExactDays'.","examples":["StraightLine"]},"depreciationInterval":{"type":"string","description":"The interval at which depreciation is recorded for the fixed asset. Possible values: 'Monthly', 'Quarterly', 'Yearly'.","examples":["Monthly"]},"depreciationStatus":{"type":"string","description":"The depreciation status of the fixed asset. Possible values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. A fixed asset with no depreciation schedule also has the value 'Completed', so check depreciatedAmount before you treat a fixed asset as fully depreciated.","examples":["Ongoing"]},"degressionRate":{"type":"string","format":"decimal","description":"The yearly rate of declining-balance depreciation, as a decimal fraction. For example, 0.2 is 20%. Used only when depreciationMethod is 'Degressive'."},"acquisitionValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset was capitalized at, in the `acquisitionValueCurrency`.","examples":["42000"]},"acquisitionValueCurrency":{"type":"string","description":"The currency of acquisitionValueAmount. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"salvageValueAmount":{"type":"string","format":"decimal","description":"The value the asset is expected to have at the end of its useful life (salvage value, also called residual value), in the `salvageValueCurrency`. Depreciation reduces the asset's net book value to this amount, not to zero.","examples":["2000"]},"salvageValueCurrency":{"type":"string","description":"The currency of salvageValueAmount. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"depreciationStartValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset's depreciation started from, in the `currency`. Present only for imported fixed assets."},"depreciableAmount":{"type":"string","format":"decimal","description":"The amount that is depreciated over the useful life of the fixed asset, in the `currency`. Formula: depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValueAmount - salvageValueAmount.","examples":["40000"]},"depreciatedAmount":{"type":"string","format":"decimal","description":"The total depreciation of the fixed asset, in the `currency`. Formula: initialDepreciatedAmount + the depreciation recorded on the depreciation schedule.","examples":["13333.33"]},"initialDepreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation the fixed asset had before it was imported, in the `currency`. Formula: acquisitionValueAmount - depreciationStartValueAmount, or 0 when depreciationStartValueAmount is absent."},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValueAmount - depreciatedAmount. It is 0 when fixedAssetStatus is 'voided' or assetStatus is 'retired' or 'disposed'.","examples":["28666.67"]},"disposalDate":{"type":"string","format":"date","description":"The date the asset was disposed of. Format: YYYY-MM-DD. Present only when the asset has been disposed of."},"disposalAmount":{"type":"string","format":"decimal","description":"The value written off when the asset was disposed of, in the `currency`. Present only when the asset has been disposed of."},"disposalEntryId":{"type":"string","description":"The journal entry that records the disposal. Present only when the asset has been disposed of. See id on GET accounting/journal-entries/:id."},"disposalEntryNumber":{"type":"string","description":"The number of the journal entry that records the disposal. Present only when the asset has been disposed of. Example: 'JE-4412'."},"soldAmountAmount":{"type":"string","format":"decimal","description":"The amount the asset was sold for, in the `soldAmountCurrency`. Present only when the asset was sold."},"soldAmountCurrency":{"type":"string","description":"The currency of soldAmountAmount. Format: ISO 4217, for example 'EUR'. It can differ from currency."},"saleEntryId":{"type":"string","description":"Platform id (a UUID) of the journal entry recording the sale. Absent when the asset wasn't sold."},"saleEntryNumber":{"type":"string","description":"Human-readable number of the sale journal entry, carried alongside saleEntryId."},"saleReceivingAccountId":{"type":"string","description":"The account the sale proceeds were received into. Present only when the asset was sold. See id on GET accounting/accounts/:id."},"revenueAccountId":{"type":"string","description":"The revenue account for the sale of the asset. Present only when the asset was sold and a revenue account was chosen for the sale. See id on GET accounting/accounts/:id."},"saleDocumentId":{"type":"string","description":"The invoice for the sale of the asset, created as a manual taxable document. Present only when the asset was sold. See id on GET tax-documents/manual-taxable-documents/:id."},"saleDocumentNumber":{"type":"string","description":"The number of the invoice for the sale of the asset. Present only when the asset was sold. See taxDocumentNumber on GET tax-documents/manual-taxable-documents/:id."},"vatPercentageId":{"type":"string","description":"The tax code applied to the sale of the asset. Present only when the asset was sold and a tax code was applied to the sale. See lines.id on GET accounting/tax-configurations/:id."},"valueAllocationId":{"type":"string","description":"The value accounting tags set on the fixed asset. Absent when the fixed asset has no tags."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Always present — the column is set on every row, and R2.4.1 wants one optionality across all three read entry points. NOTE it tracks the FixedAsset row only: renaming or reassigning the underlying CompanyAsset does not move it.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id","fixedAssetStatus","companyAssetId","lastModifiedDate"]},"fixedAssetTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the fixed asset type — the public identifier of this record.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]},"name":{"type":"string","description":"Display name of the fixed asset type, e.g. 'Machinery'. Filterable and orderable by exact match — a type name is a configuration label, not identifying data, so unlike most name fields it is admitted to the query string. There is no free-text matching on it.","examples":["Machinery"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the type is usable for business users. A type is deactivated rather than deleted once assets reference it, so this collection carries both; filter it to populate a picker. Absent on legacy rows that predate the column, which should be read as active.","examples":[true]},"defaultUsefulLife":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of depreciation periods a new asset of this type inherits as its useful life. A whole COUNT of periods, not an amount and not a duration: the depreciation interval that gives it units (monthly, quarterly, yearly) lives on the asset, so this number alone does not say whether it means months or years. Absent when the type sets no default.","examples":[60]},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Platform id (a UUID) of the FixedAssetTypeGroup this type belongs to. Absent on an ungrouped type. That group may itself have a parent group, which this API does not walk.","examples":["2e8c14a9-6b73-4f52-9d01-8a3f7e0c5b26"]},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the group named by groupId, carried alongside it so the common grouping needs no second call. Returned but NOT filterable or orderable — filter groupId instead, so one question has one answer. Absent whenever groupId is.","examples":["Plant and Equipment"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset type record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filterable and orderable together, which is what makes filter[lastModifiedDate][gte] plus sort=lastModifiedDate a complete incremental-sync cursor. NOTE it tracks the FixedAssetType row only: renaming the group a type belongs to does not move it.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"listFixedAssetsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed asset.","examples":["9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915"]},"fixedAssetNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fixed asset number. Unique within the tenant. Each book's fixed asset has its own number, unlike assetNumber, which is the same in every book. Example: 'FA-1'.","examples":["FA-000142"]},"fixedAssetStatus":{"type":"string","description":"The status of the fixed asset. Possible values: 'active', 'voided'.","examples":["active"]},"companyAssetId":{"type":"string","description":"The asset this fixed asset records. Fixed assets of the same asset in different books have the same companyAssetId.","examples":["3a7e5c81-9b24-4d0f-8e63-1c95af207b48"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the asset.","examples":["Forklift - Warehouse 2"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that owns the asset. See id on GET base/entities.","examples":["c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9"]},"assetStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The physical status of the asset. Possible values: 'available', 'broken', 'inRepair', 'inUse', 'retired', 'disposed'. Disposing of an asset sets assetStatus to 'disposed' and leaves fixedAssetStatus as 'active'.","examples":["inUse"]},"assetNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The asset number. It is unique within the tenant, and all fixed assets of the same asset have the same number.","examples":["CA-0881"]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The serial number of the asset. It is free text and does not have to be unique.","examples":["SN-77120934"]},"assetTag":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The asset tag of the asset, such as the code on a label attached to it. It is free text.","examples":["WH2-FORK-03"]},"acquisitionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the asset was acquired. Format: YYYY-MM-DD.","examples":["2024-03-11"]},"departmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The department the asset is assigned to. Absent when the asset has no department. See id on GET people/departments/:id."},"businessUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The business unit the asset is assigned to. Absent when the asset has no business unit."},"typeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of the fixed asset.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]},"typeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the fixed asset type. Example: 'Machinery'.","examples":["Machinery"]},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting book the fixed asset is recorded in. See id on GET accounting/books/:id.","examples":["e0c37a94-2d15-4b86-9f42-5a7c81de03b6"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"inServiceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the asset was placed in service. The depreciation schedule is calculated from this date. Format: YYYY-MM-DD.","examples":["2024-04-01"]},"depreciationMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation method of the fixed asset. Possible values: 'StraightLine', 'StraightLineProRateFirstLast', 'Degressive', 'Immediate', 'Bypassed', 'StraightLineHalfMonth', 'ExactDays'.","examples":["StraightLine"]},"depreciationInterval":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The interval at which depreciation is recorded for the fixed asset. Possible values: 'Monthly', 'Quarterly', 'Yearly'.","examples":["Monthly"]},"depreciationStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation status of the fixed asset. Possible values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. A fixed asset with no depreciation schedule also has the value 'Completed', so check depreciatedAmount before you treat a fixed asset as fully depreciated.","examples":["Ongoing"]},"degressionRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The yearly rate of declining-balance depreciation, as a decimal fraction. For example, 0.2 is 20%. Used only when depreciationMethod is 'Degressive'."},"acquisitionValueAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value the fixed asset was capitalized at, in the `acquisitionValueCurrency`.","examples":["42000"]},"acquisitionValueCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of acquisitionValueAmount. Format: ISO 4217, for example 'EUR'."},"salvageValueAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value the asset is expected to have at the end of its useful life (salvage value, also called residual value), in the `salvageValueCurrency`. Depreciation reduces the asset's net book value to this amount, not to zero."},"salvageValueCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of salvageValueAmount. Format: ISO 4217, for example 'EUR'."},"depreciationStartValueAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value the fixed asset's depreciation started from, in the `currency`. Present only for imported fixed assets."},"depreciableAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount that is depreciated over the useful life of the fixed asset, in the `currency`. Formula: depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValueAmount - salvageValueAmount.","examples":["40000"]},"depreciatedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total depreciation of the fixed asset, in the `currency`. Formula: initialDepreciatedAmount + the depreciation recorded on the depreciation schedule.","examples":["13333.33"]},"initialDepreciatedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The depreciation the fixed asset had before it was imported, in the `currency`. Formula: acquisitionValueAmount - depreciationStartValueAmount, or 0 when depreciationStartValueAmount is absent."},"remainingValue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValueAmount - depreciatedAmount. It is 0 when fixedAssetStatus is 'voided' or assetStatus is 'retired' or 'disposed'.","examples":["28666.67"]},"disposalDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the asset was disposed of. Format: YYYY-MM-DD. Present only when the asset has been disposed of."},"disposalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value written off when the asset was disposed of, in the `currency`. Present only when the asset has been disposed of."},"disposalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The journal entry that records the disposal. Present only when the asset has been disposed of. See id on GET accounting/journal-entries/:id."},"disposalEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the journal entry that records the disposal. Present only when the asset has been disposed of. Example: 'JE-4412'."},"soldAmountAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount the asset was sold for, in the `soldAmountCurrency`. Present only when the asset was sold."},"soldAmountCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of soldAmountAmount. Format: ISO 4217, for example 'EUR'. It can differ from currency."},"saleEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Platform id (a UUID) of the journal entry recording the sale. Absent when the asset wasn't sold."},"saleEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable number of the sale journal entry, carried alongside saleEntryId."},"saleReceivingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account the sale proceeds were received into. Present only when the asset was sold. See id on GET accounting/accounts/:id."},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The revenue account for the sale of the asset. Present only when the asset was sold and a revenue account was chosen for the sale. See id on GET accounting/accounts/:id."},"saleDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice for the sale of the asset, created as a manual taxable document. Present only when the asset was sold. See id on GET tax-documents/manual-taxable-documents/:id."},"saleDocumentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the invoice for the sale of the asset. Present only when the asset was sold. See taxDocumentNumber on GET tax-documents/manual-taxable-documents/:id."},"vatPercentageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax code applied to the sale of the asset. Present only when the asset was sold and a tax code was applied to the sale. See lines.id on GET accounting/tax-configurations/:id."},"valueAllocationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value accounting tags set on the fixed asset. Absent when the fixed asset has no tags."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). NOTE it tracks the FixedAsset row only: renaming or reassigning the underlying CompanyAsset does not move it.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"getFixedAssetTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the fixed asset type — the public identifier of this record.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]},"name":{"type":"string","description":"Display name of the fixed asset type, e.g. 'Machinery'. Unique per tenant is NOT guaranteed by this contract; treat id as the identity.","examples":["Machinery"]},"active":{"type":"boolean","description":"Whether the type is usable for business users. A type is deactivated rather than deleted once assets reference it, so an inactive type is still returned here and by the collection. Absent on legacy rows that predate the column, which should be read as active.","examples":[true]},"defaultUsefulLife":{"type":"number","description":"Number of depreciation periods a new asset of this type inherits as its useful life. A whole COUNT of periods, not an amount and not a duration: the depreciation interval that gives it units (monthly, quarterly, yearly) lives on the asset, so this number alone does not say whether it means months or years. Absent when the type sets no default.","examples":[60]},"groupId":{"type":"string","description":"Platform id (a UUID) of the FixedAssetTypeGroup this type belongs to. Absent on an ungrouped type. That group may itself have a parent group, which this API does not walk.","examples":["2e8c14a9-6b73-4f52-9d01-8a3f7e0c5b26"]},"groupName":{"type":"string","description":"Display name of the group named by groupId, carried alongside it so the common grouping needs no second call. Absent whenever groupId is.","examples":["Plant and Equipment"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset type record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). NOTE it tracks the FixedAssetType row only: renaming the group a type belongs to does not move it.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"searchDepreciationSchedulesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation schedule."},"scheduleNumber":{"type":"string","description":"The depreciation schedule number. Unique within the tenant. Example: 'DS-0042'."},"fixedAssetId":{"type":"number","description":"The internal number of the fixed asset the schedule depreciates. It is not the `id` that the fixed asset endpoints use."},"entityId":{"type":"number","description":"The internal number of the legal entity that owns the fixed asset. It is not the `id` that the legal entity endpoints use."},"bookId":{"type":"number","description":"The internal number of the accounting book the fixed asset is tracked in. It is not the `id` that the accounting book endpoints use, or the `bookId` on a depreciation policy."},"depreciationRuleId":{"type":"number","description":"The internal number of the depreciation rule applied to the fixed asset. A rule links a depreciation policy to a fixed asset type and sets the useful life."},"status":{"type":"string","description":"The status of the schedule. Possible values: 'NotStarted' (no line has been recorded), 'Ongoing' (some lines have been recorded), 'Completed' (every line has been recorded), 'Disposed' (the fixed asset was disposed of), 'Voided' (the fixed asset was voided)."},"acquisitionDate":{"type":"string","format":"date","description":"The date the fixed asset was acquired. Format: YYYY-MM-DD. It can be earlier than startDate."},"startDate":{"type":"string","format":"date","description":"The date depreciation starts. Format: YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of depreciation. Format: YYYY-MM-DD."},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'."},"acquisitionValue":{"type":"string","format":"decimal","description":"The acquisition cost of the fixed asset, in the `currency`."},"depreciableAmount":{"type":"string","format":"decimal","description":"The total amount to depreciate over the schedule, in the `currency`. Formula: the fixed asset's depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValue - salvageValueAmount. See depreciationStartValueAmount and salvageValueAmount on GET fixed-assets/:id."},"depreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation recorded on this schedule, in the `currency`. Formula: the sum of the recorded schedule lines. Lines that have not been recorded do not count, whatever their dates."},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValue - depreciatedAmount, or when the fixed asset has a depreciationStartValueAmount, depreciationStartValueAmount - depreciatedAmount. It is 0 once the fixed asset is voided, retired, or disposed of."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation schedule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Recording depreciation changes depreciatedAmount and remainingValue. It updates lastModifiedDate only when the schedule's status changes."}},"additionalProperties":false,"required":["id","fixedAssetId","entityId","bookId","depreciationRuleId","status","acquisitionDate","startDate","endDate","currency","acquisitionValue","depreciableAmount","depreciatedAmount","remainingValue","lastModifiedDate"]},"description":"The depreciation schedules on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39","scheduleNumber":"DS-0042","fixedAssetId":3187,"entityId":1,"bookId":1,"depreciationRuleId":12,"status":"Ongoing","acquisitionDate":"2024-01-15","startDate":"2024-02-01","endDate":"2029-01-31","currency":"EUR","acquisitionValue":"24000.00","depreciableAmount":"21600.00","depreciatedAmount":"7560.00","remainingValue":"16440.00","lastModifiedDate":"2026-08-14T09:12:33.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more depreciation schedules match after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether more depreciation schedules match, and the cursor for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchDepreciationSchedulesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the depreciation schedule with this id. The match is exact. A value that is not in the format of an id matches no schedule."},"scheduleNumber":{"type":"string","description":"Limits results to the depreciation schedule with this schedule number. The match is exact and case-sensitive. Example: 'DS-0042'."},"fixedAssetIds":{"type":"array","items":{"type":"number"},"description":"Limits results to the schedules of any of these fixed assets. The match is exact. Send the internal numbers that schedules return in `fixedAssetId`, not the `id` that the fixed asset endpoints use."},"entityIds":{"type":"array","items":{"type":"number"},"description":"Limits results to schedules for fixed assets owned by any of these legal entities. The match is exact. Send the internal numbers that schedules return in `entityId`, not the `id` that the legal entity endpoints use."},"bookIds":{"type":"array","items":{"type":"number"},"description":"Limits results to schedules for fixed assets tracked in any of these accounting books. The match is exact. Send the internal numbers that schedules return in `bookId`, not the `id` that the accounting book endpoints use."},"status":{"type":"string","description":"Limits results to schedules with this status. Accepted values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'."},"startDateFrom":{"type":"string","format":"date","description":"Limits results to schedules whose startDate is on or after this date. Format: YYYY-MM-DD."},"startDateTo":{"type":"string","format":"date","description":"Limits results to schedules whose startDate is on or before this date. Format: YYYY-MM-DD."},"endDateFrom":{"type":"string","format":"date","description":"Limits results to schedules whose endDate is on or after this date. Format: YYYY-MM-DD."},"endDateTo":{"type":"string","format":"date","description":"Limits results to schedules whose endDate is on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The filters to apply. A schedule must match every filter you send. Omit to return all depreciation schedules. If you send an empty list for a filter, that filter is ignored.","examples":[{"status":"Ongoing","entityIds":[1],"startDateFrom":"2024-01-01","startDateTo":"2024-12-31"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of depreciation schedules per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, and a value below 1 as 1, not rejected."}},"additionalProperties":false,"description":"The page of results to return. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"recordDepreciationOutput":{"type":"object","properties":{"asyncExecution":{"type":"boolean","description":"Whether the recording was queued to run in the background. True when you sent more than 35 line ids. When true, the journal entries do not exist yet, and a problem with the lines is not reported in the response.","examples":[false]},"lineCount":{"type":"number","description":"The number of line ids you sent, including duplicates and ids that match no line. It can be more than the number of lines recorded.","examples":[3]}},"additionalProperties":false,"required":["asyncExecution","lineCount"]},"recordDepreciationInput":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"number"},"description":"The internal numbers of the depreciation schedule lines to record. Send at least one. An id that matches no line is skipped, as long as at least one id matches. A line that is already recorded cannot be recorded again, and sending one fails the request.","examples":[[101,102,103]]},"postingDate":{"type":"string","format":"date","description":"The posting date of the journal entries that recording creates. Format: YYYY-MM-DD. The date must fall in an accounting period of the legal entity's book that is open for posting. It does not have to fall in the period the lines belong to.","examples":["2026-09-30"]}},"additionalProperties":false,"required":["lineIds","postingDate"]},"searchFixedAssetsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed asset."},"fixedAssetNumber":{"type":"string","description":"The fixed asset number. Unique within the tenant. Each book's fixed asset has its own number, unlike assetNumber, which is the same in every book. Example: 'FA-1'."},"fixedAssetStatus":{"type":"string","description":"The status of the fixed asset. Possible values: 'active', 'voided'. Voided fixed assets are returned here, unlike on `GET fixed-assets`."},"companyAssetId":{"type":"string","description":"The asset this fixed asset records. Fixed assets of the same asset in different books have the same companyAssetId."},"name":{"type":"string","description":"The name of the asset."},"entityId":{"type":"string","description":"The legal entity that owns the asset. See id on GET base/entities."},"assetStatus":{"type":"string","description":"The physical status of the asset. Possible values: 'available', 'broken', 'inRepair', 'inUse', 'retired', 'disposed'. Disposing of an asset sets assetStatus to 'disposed' and leaves fixedAssetStatus as 'active'."},"assetNumber":{"type":"string","description":"The asset number. It is unique within the tenant, and all fixed assets of the same asset have the same number."},"serialNumber":{"type":"string","description":"The serial number of the asset. It is free text and does not have to be unique."},"assetTag":{"type":"string","description":"The asset tag of the asset, such as the code on a label attached to it. It is free text."},"acquisitionDate":{"type":"string","format":"date","description":"The date the asset was acquired. Format: YYYY-MM-DD."},"departmentId":{"type":"string","description":"The department the asset is assigned to. Absent when the asset has no department. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit the asset is assigned to. Absent when the asset has no business unit."},"typeId":{"type":"string","description":"The type of the fixed asset."},"typeName":{"type":"string","description":"The name of the fixed asset type. Example: 'Machinery'."},"bookId":{"type":"string","description":"The accounting book the fixed asset is recorded in. See id on GET accounting/books/:id."},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'."},"inServiceDate":{"type":"string","format":"date","description":"The date the asset was placed in service. The depreciation schedule is calculated from this date. Format: YYYY-MM-DD."},"depreciationMethod":{"type":"string","description":"The depreciation method of the fixed asset. Possible values: 'StraightLine', 'StraightLineProRateFirstLast', 'Degressive', 'Immediate', 'Bypassed', 'StraightLineHalfMonth', 'ExactDays'."},"depreciationInterval":{"type":"string","description":"The interval at which depreciation is recorded for the fixed asset. Possible values: 'Monthly', 'Quarterly', 'Yearly'."},"depreciationStatus":{"type":"string","description":"The depreciation status of the fixed asset. Possible values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. A fixed asset with no depreciation schedule also has the value 'Completed', so check depreciatedAmount before you treat a fixed asset as fully depreciated."},"degressionRate":{"type":"string","format":"decimal","description":"The yearly rate of declining-balance depreciation, as a decimal fraction. For example, 0.2 is 20%. Used only when depreciationMethod is 'Degressive'."},"acquisitionValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset was capitalized at, in the `acquisitionValueCurrency`."},"acquisitionValueCurrency":{"type":"string","description":"The currency of acquisitionValueAmount. Format: ISO 4217, for example 'EUR'."},"salvageValueAmount":{"type":"string","format":"decimal","description":"The value the asset is expected to have at the end of its useful life (salvage value, also called residual value), in the `salvageValueCurrency`. Depreciation reduces the asset's net book value to this amount, not to zero."},"salvageValueCurrency":{"type":"string","description":"The currency of salvageValueAmount. Format: ISO 4217, for example 'EUR'."},"depreciationStartValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset's depreciation started from, in the `currency`. Present only for imported fixed assets."},"depreciableAmount":{"type":"string","format":"decimal","description":"The amount that is depreciated over the useful life of the fixed asset, in the `currency`. Formula: depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValueAmount - salvageValueAmount."},"depreciatedAmount":{"type":"string","format":"decimal","description":"The total depreciation of the fixed asset, in the `currency`. Formula: initialDepreciatedAmount + the depreciation recorded on the depreciation schedule."},"initialDepreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation the fixed asset had before it was imported, in the `currency`. Formula: acquisitionValueAmount - depreciationStartValueAmount, or 0 when depreciationStartValueAmount is absent."},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValueAmount - depreciatedAmount. It is 0 when fixedAssetStatus is 'voided' or assetStatus is 'retired' or 'disposed'."},"disposalDate":{"type":"string","format":"date","description":"The date the asset was disposed of. Format: YYYY-MM-DD. Present only when the asset has been disposed of."},"disposalAmount":{"type":"string","format":"decimal","description":"The value written off when the asset was disposed of, in the `currency`. Present only when the asset has been disposed of."},"disposalEntryId":{"type":"string","description":"The journal entry that records the disposal. Present only when the asset has been disposed of. See id on GET accounting/journal-entries/:id."},"disposalEntryNumber":{"type":"string","description":"The number of the journal entry that records the disposal. Present only when the asset has been disposed of. Example: 'JE-4412'."},"soldAmountAmount":{"type":"string","format":"decimal","description":"The amount the asset was sold for, in the `soldAmountCurrency`. Present only when the asset was sold."},"soldAmountCurrency":{"type":"string","description":"The currency of soldAmountAmount. Format: ISO 4217, for example 'EUR'. It can differ from currency."},"saleEntryId":{"type":"string","description":"Platform id (a UUID) of the journal entry recording the sale. Absent when the asset wasn't sold."},"saleEntryNumber":{"type":"string","description":"Human-readable number of the sale journal entry, carried alongside saleEntryId."},"saleReceivingAccountId":{"type":"string","description":"The account the sale proceeds were received into. Present only when the asset was sold. See id on GET accounting/accounts/:id."},"revenueAccountId":{"type":"string","description":"The revenue account for the sale of the asset. Present only when the asset was sold and a revenue account was chosen for the sale. See id on GET accounting/accounts/:id."},"saleDocumentId":{"type":"string","description":"The invoice for the sale of the asset, created as a manual taxable document. Present only when the asset was sold. See id on GET tax-documents/manual-taxable-documents/:id."},"saleDocumentNumber":{"type":"string","description":"The number of the invoice for the sale of the asset. Present only when the asset was sold. See taxDocumentNumber on GET tax-documents/manual-taxable-documents/:id."},"vatPercentageId":{"type":"string","description":"The tax code applied to the sale of the asset. Present only when the asset was sold and a tax code was applied to the sale. See lines.id on GET accounting/tax-configurations/:id."},"valueAllocationId":{"type":"string","description":"The value accounting tags set on the fixed asset. Absent when the fixed asset has no tags."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Always present — the column is set on every row, and R2.4.1 wants one optionality across all three read entry points. NOTE it tracks the FixedAsset row only: renaming or reassigning the underlying CompanyAsset does not move it."}},"additionalProperties":false,"required":["id","fixedAssetStatus","companyAssetId","lastModifiedDate"]},"description":"The fixed assets on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915","fixedAssetNumber":"FA-000142","fixedAssetStatus":"active","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","name":"Forklift - Warehouse 2","entityId":"c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9","assetStatus":"inUse","assetNumber":"CA-0881","serialNumber":"SN-77120934","assetTag":"WH2-FORK-03","typeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","typeName":"Machinery","currency":"EUR","inServiceDate":"2024-04-01","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationStatus":"Ongoing","acquisitionValueAmount":"42000","depreciatedAmount":"13333.33","remainingValue":"28666.67","lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether more fixed assets match after this page."},"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether more fixed assets match, and the cursor for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchFixedAssetsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the fixed assets with these ids. The match is exact."},"fixedAssetNumber":{"type":"string","description":"Limits results to the fixed asset with this fixed asset number. The match is exact and case-sensitive. Example: 'FA-1'."},"assetNumber":{"type":"string","description":"Limits results to the fixed assets with this asset number. The match is exact and case-sensitive. All the fixed assets of the asset are returned, one for each book it is recorded in."},"serialNumber":{"type":"string","description":"Limits results to fixed assets whose asset has this serial number. The match is exact and case-sensitive."},"name":{"type":"string","description":"Limits results to fixed assets whose name contains this text. The match is case-insensitive, and % and _ match as ordinary characters. Spaces at the start and end are ignored. If the text is empty or only spaces, this filter is ignored."},"assetTag":{"type":"string","description":"Limits results to fixed assets whose asset tag contains this text. The match is case-insensitive, and % and _ match as ordinary characters. Spaces at the start and end are ignored. If the text is empty or only spaces, this filter is ignored."},"entityIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets whose asset belongs to any of these legal entities. The match is exact. See id on GET base/entities."},"bookIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets in any of these accounting books. The match is exact. An asset recorded in more than one book has one fixed asset in each, so send one book before you add up amounts. See id on GET accounting/books/:id."},"typeIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets of any of these types. The match is exact."},"departmentIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets whose asset is assigned to any of these departments. The match is exact. See id on GET people/departments/:id."},"businessUnitIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets whose asset is assigned to any of these business units. The match is exact."},"fixedAssetStatuses":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets with any of these statuses. Accepted values: 'active', 'voided'. Send ['active'] to leave out voided fixed assets."},"depreciationStatuses":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets with any of these depreciation statuses. Accepted values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. 'Completed' also matches fixed assets that have no depreciation schedule."},"depreciationMethods":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets with any of these depreciation methods. Accepted values: 'StraightLine', 'StraightLineProRateFirstLast', 'Degressive', 'Immediate', 'Bypassed', 'StraightLineHalfMonth', 'ExactDays'."},"depreciationIntervals":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets with any of these depreciation intervals. Accepted values: 'Monthly', 'Quarterly', 'Yearly'."},"assetStatuses":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets whose asset has any of these physical statuses. Accepted values: 'available', 'broken', 'inRepair', 'inUse', 'retired', 'disposed'."},"currencies":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets in any of these currencies. Format: ISO 4217, for example 'EUR'. The match is exact and case-sensitive."},"inServiceDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Limits results to fixed assets placed in service on or after this date. Format: YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Limits results to fixed assets placed in service on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The range of in-service dates to match. Send start, end, or both."},"acquisitionDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Limits results to fixed assets acquired on or after this date. Format: YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Limits results to fixed assets acquired on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The range of acquisition dates to match. Send start, end, or both."},"disposalDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Limits results to fixed assets disposed of on or after this date. Format: YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Limits results to fixed assets disposed of on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The range of disposal dates to match. Send start, end, or both."},"disposed":{"type":"boolean","description":"When true, returns only fixed assets that have been disposed of. When false, returns only fixed assets that have not been disposed of. Omit to return both."},"acquisitionValueAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"Limits results to fixed assets with an acquisitionValueAmount of this value or more."},"max":{"type":"string","format":"decimal","description":"Limits results to fixed assets with an acquisitionValueAmount of this value or less."}},"additionalProperties":false,"description":"The range of acquisition values to match. Each fixed asset's value is compared in its own `acquisitionValueCurrency`, without conversion. Send min, max, or both."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"Limits results to fixed assets that last changed at or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"Limits results to fixed assets that last changed at or before this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The range of last-change times to match, in UTC. Send start, end, or both."}},"additionalProperties":false,"description":"The filters to apply. A fixed asset must match every filter you send. Omit to return all fixed assets. If you send an empty list for a filter, that filter is ignored.","examples":[{"serialNumber":"SN-77120934"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of fixed assets per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, and a value below 1 as 1, not rejected."}},"additionalProperties":false,"description":"The page of results to return. Omit for the first page."}},"additionalProperties":false},"createTeamMembersOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the created position assignment. This is the id GET psa/team-member-positions returns."}},"additionalProperties":false,"required":["id"]},"description":"The ids of the position assignments created, in the order the entries were sent. An entry that created no position assignment contributes no id, so this can be shorter than the input. Read a record back with GET psa/team-member-positions/:id.","examples":[[{"id":"5f2e1c40-9a3b-4d71-8e05-6b4c2d1a7f93"}]]}},"additionalProperties":false,"required":["created"]},"createTeamMembersInput":{"type":"object","properties":{"psaProjectId":{"type":"number","description":"The PSA project to add the people to. It is a numeric key, not the UUID that GET psa/projects/:id takes. Adding people needs edit permission on this project.","examples":[32341]},"assignments":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"number","description":"The employee to add. Give either employeeId or placeholderId, not both. The employee joins the team even when projectPositionId is omitted. It is a numeric key."},"placeholderId":{"type":"number","description":"The placeholder to assign. Give either employeeId or placeholderId, not both. A placeholder item with no projectPositionId creates nothing. It is a numeric key."},"projectPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The project position to assign this person or placeholder to. Omit it to add the person to the team without a position assignment. It is a numeric key."}},"additionalProperties":false},"description":"One entry per person or placeholder to add. Each entry needs exactly one of employeeId or placeholderId. Either all are added, or none are.","examples":[[{"employeeId":3845142,"projectPositionId":7},{"placeholderId":91}]]}},"additionalProperties":false,"required":["psaProjectId","assignments"]},"deletePlaceholderOutput":{"type":"object","properties":{},"additionalProperties":false},"approveTimeEntriesOutput":{"type":"object","properties":{"approved":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entry."}},"additionalProperties":false,"required":["id"]},"description":"The entries whose status was set to approved.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}]]}},"additionalProperties":false,"required":["approved"]},"approveTimeEntriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the time entries to approve.","examples":[["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]]}},"additionalProperties":false,"required":["ids"]},"getPsaPositionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position.","examples":["7c2e91a4-58fd-4b30-9e17-3a6d05fb824c"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this position belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"name":{"type":"string","description":"The display name of the position.","examples":["Senior Consultant"]},"description":{"type":"string","description":"A free-form description of the position's responsibilities.","examples":["Leads the delivery workstream on site."]},"salesOrderProductLineId":{"type":"number","description":"The id of the sales order product line this position fulfills. It is a numeric key. There is no endpoint for it."},"salesOrderProductLineRateCardEntryId":{"type":"number","description":"The id of the sales order product line rate card entry used for billing. It is a numeric key. There is no endpoint for it."},"productId":{"type":"number","description":"The id of the product this position is billed against. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"type":"number","description":"The id of the product line this position is billed against. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"productLineRateCardEntryId":{"type":"number","description":"The id of the product line rate card entry. It is a numeric key. There is no endpoint for it."},"billable":{"type":"boolean","description":"Whether work in this position is billable to the customer.","examples":[true]},"unitOfMeasure":{"type":"string","description":"The unit the stored bill rate, cost rate and budget are expressed in. It is a member of the UnitOfMeasureType enum, in practice 'hour' or 'day' for a position, with 'hour' the default.","examples":["hour"]},"hourlyBillRate":{"type":"string","format":"decimal","description":"The bill rate for this position, as an hourly amount, in the currency given by hourlyBillRateCurrency.","examples":["185.00"]},"hourlyBillRateCurrency":{"type":"string","description":"The currency of hourlyBillRate. Format ISO 4217, for example 'USD'.","examples":["USD"]},"hourlyCostRate":{"type":"string","format":"decimal","description":"The cost rate for this position, as an hourly amount, in the currency given by hourlyCostRateCurrency.","examples":["110.00"]},"hourlyCostRateCurrency":{"type":"string","description":"The currency of hourlyCostRate. Format ISO 4217, for example 'USD'.","examples":["USD"]},"hoursBudget":{"type":"string","format":"decimal","description":"The budgeted hours for this position. It is a quantity in hours and has no currency.","examples":["120.00"]},"invoiced":{"type":"boolean","description":"Whether work in this position has been invoiced.","examples":[false]},"hrPositionId":{"type":"number","description":"The id of the HR position this PSA position maps to. It is a numeric key, not the UUID that GET people/positions/:id takes."},"skillLevelId":{"type":"number","description":"The id of the skill level (position seniority) this PSA position maps to. It is a numeric key. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the position record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id","psaProjectId","lastModifiedDate"]},"deletePsaProjectsOutput":{"type":"object","properties":{},"additionalProperties":false},"deletePsaProjectsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the projects to delete. If any id does not match a project, nothing is deleted. If any project has been invoiced (or has an invoiced milestone), the call fails and nothing is archived or deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]},"irreversible":{"type":"boolean","description":"Whether to delete the projects permanently. Defaults to false, which archives them instead. Archived projects can be restored with POST psa/projects/bulk-restore."}},"additionalProperties":false,"required":["ids"]},"psaPositionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position.","examples":["7c2e91a4-58fd-4b30-9e17-3a6d05fb824c"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this position belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the position.","examples":["Senior Consultant"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the position's responsibilities.","examples":["Leads the delivery workstream on site."]},"salesOrderProductLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the sales order product line this position fulfills. It is a numeric key. There is no endpoint for it."},"salesOrderProductLineRateCardEntryId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the sales order product line rate card entry used for billing. It is a numeric key. There is no endpoint for it."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product this position is billed against. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line this position is billed against. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"productLineRateCardEntryId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line rate card entry. It is a numeric key. There is no endpoint for it."},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether work in this position is billable to the customer.","examples":[true]},"unitOfMeasure":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit the stored bill rate, cost rate and budget are expressed in. It is a member of the UnitOfMeasureType enum, in practice 'hour' or 'day' for a position, with 'hour' the default.","examples":["hour"]},"hourlyBillRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The bill rate for this position, as an hourly amount, in the currency given by hourlyBillRateCurrency.","examples":["185.00"]},"hourlyBillRateCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of hourlyBillRate. Format ISO 4217, for example 'USD'.","examples":["USD"]},"hourlyCostRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost rate for this position, as an hourly amount, in the currency given by hourlyCostRateCurrency.","examples":["110.00"]},"hourlyCostRateCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of hourlyCostRate. Format ISO 4217, for example 'USD'.","examples":["USD"]},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The budgeted hours for this position. It is a quantity in hours and has no currency.","examples":["120.00"]},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether work in this position has been invoiced.","examples":[false]},"hrPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the HR position this PSA position maps to. It is a numeric key, not the UUID that GET people/positions/:id takes."},"skillLevelId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the skill level (position seniority) this PSA position maps to. It is a numeric key. There is no endpoint for it."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the position record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"bulkCreateProjectTypesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for a created project type."}},"additionalProperties":false,"required":["id"]},"description":"The identifiers of the created project types, in the order their distinct names were sent. A repeated name produces one entry, so a request that repeats a name returns fewer entries than it sent.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateProjectTypesInput":{"type":"object","properties":{"projectTypes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the project type."}},"additionalProperties":false,"required":["name"]},"description":"The project types to create. Naming the same project type twice creates it once. If any entry is invalid, the whole call is rejected and nothing is written.","examples":[[{"name":"Retainer"},{"name":"Fixed Bid"}]]}},"additionalProperties":false,"required":["projectTypes"]},"placeholdersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the placeholder.","examples":["3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"]},"name":{"type":"string","description":"The display name of the placeholder, for example 'Unassigned Backend Engineer'. Unique within the tenant.","examples":["Unassigned Backend Engineer"]},"weeklyWorkingHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The weekly working hours used for planning, as a non-negative number of hours, for example 40.00. Absent when none was set.","examples":["40.00"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the placeholder last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.184Z"]}},"additionalProperties":false},"timeEntriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the time entry.","examples":["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]},"date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the time was logged for. Format YYYY-MM-DD.","examples":["2026-08-10"]},"hours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total hours logged in this entry.","examples":["8"]},"billableHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours classified as billable to a customer, derived from projectActivityCategory.","examples":["8"]},"nonBillableHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours classified as non-billable to a customer, derived from projectActivityCategory.","examples":["0"]},"internalValuableHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours classified as internal valuable work, derived from projectActivityCategory.","examples":["0"]},"internalNonValuableHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours classified as internal non-valuable work, derived from projectActivityCategory.","examples":["0"]},"invoicedHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours that have been invoiced, a subset of billableHours.","examples":["0"]},"revenue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue from this time entry, in the currency given by currency.","examples":["1250.00"]},"cost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost of this time entry, in the currency given by currency.","examples":["800.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of revenue and cost. Format ISO 4217, for example 'USD'. It is the currency of the project position's bill rate.","examples":["USD"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes on the time entry.","examples":["Sprint 14 backend work"]},"submissionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The submission and approval status of the entry. Possible values: 'draft', 'pending', 'approved', 'rejected', 'submittedForInvoicing', 'invoiced'.","examples":["draft"]},"submissionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the entry was submitted for approval. Format YYYY-MM-DD.","examples":["2026-08-11"]},"month":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the month the entry is reported under. Format YYYY-MM-DD.","examples":["2026-08-01"]},"memberId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the PSA member assignment the time was logged for. GET psa/team-members/:id takes the member's UUID, not this key, so it cannot fetch the member.","examples":[5001]},"memberEmployeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the employee who logged the time. There is no endpoint for it.","examples":[3845142]},"memberEmployeeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the employee who logged the time.","examples":["Alex Rivera"]},"projectActivityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the activity the time was logged against. GET psa/activities/:id takes the activity's UUID, not this key, so it cannot fetch the activity.","examples":[7001]},"projectActivityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the activity the time was logged against.","examples":["Implementation"]},"projectActivityCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billability category of the activity the time was logged against. The billable, non-billable and internal-hour fields are derived from it. See category on GET psa/activities/:id.","examples":["ClientBillable"]},"projectPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the position the time was logged against. GET psa/positions/:id takes the position's UUID, not this key, so it cannot fetch the position.","examples":[9001]},"projectPositionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the position the time was logged against.","examples":["Senior Engineer"]},"psaProjectId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the PSA project the entry belongs to. GET psa/projects/:id takes the project's UUID, not this key, so it cannot fetch the project.","examples":[32341]},"projectName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the PSA project the entry belongs to.","examples":["Atlas rollout"]},"psaProjectStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the PSA project this entry belongs to.","examples":["active"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"createTimeEntriesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created time entry."}},"additionalProperties":false,"required":["id"]},"description":"The created entries, in input order. Each is an id only. Read an entry back with GET psa/time-entries/:id.","examples":[[{"id":"4f0ad2e6-8c13-4b7a-9e52-6d81b30f7ac9"}]]}},"additionalProperties":false,"required":["created"]},"createTimeEntriesInput":{"type":"object","properties":{"timeEntries":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"The date the time is logged for. Use format YYYY-MM-DD."},"hours":{"type":"string","format":"decimal","description":"The total hours for the entry."},"projectActivityId":{"type":"number","description":"The numeric key of the project activity to log time against."},"memberId":{"type":"number","description":"The numeric key of the PSA member assignment to log time for."},"psaProjectId":{"type":"number","description":"The numeric key of the PSA project the entry belongs to. If omitted, it is derived from projectActivityId."},"notes":{"type":"string","description":"Free-form notes for the entry. Required when the project's settings require notes."}},"additionalProperties":false,"required":["date","hours","projectActivityId","memberId"]},"description":"The time entries to create.","examples":[[{"date":"2026-08-04","hours":"7.5","projectActivityId":7001,"memberId":5001,"notes":"Sprint 14 backend work"}]]}},"additionalProperties":false,"required":["timeEntries"]},"getMilestoneOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the milestone.","examples":["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]},"name":{"type":"string","description":"The display name of the milestone.","examples":["Phase 1 delivery"]},"description":{"type":"string","description":"A free-form description of the milestone."},"amount":{"type":"string","format":"decimal","description":"The milestone amount, in the currency given by currency.","examples":["15000.00"]},"currency":{"type":"string","description":"The currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"dueDate":{"type":"string","format":"date","description":"The date the milestone is due for completion. Format YYYY-MM-DD.","examples":["2026-09-30"]},"status":{"type":"string","description":"The status of the milestone. Possible values: 'pending', 'accomplished', 'invoiced'.","examples":["pending"]},"billable":{"type":"boolean","description":"Whether the milestone is billable to a customer.","examples":[true]},"psaProjectId":{"type":"number","description":"The id of the PSA project this milestone belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"invoiceId":{"type":"number","description":"The id of the invoice this milestone has been billed on. Absent when the milestone has not been invoiced. It is a numeric key, not the UUID that GET accounting/invoices/:id takes."},"productId":{"type":"number","description":"The id of the product this milestone is associated with. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"type":"number","description":"The id of the product line this milestone is associated with. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the milestone record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id","psaProjectId","lastModifiedDate"]},"createPlaceholdersOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The identifiers of the created placeholders, in the order they were sent.","examples":[["3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13","b7c40e29-1af6-42d8-8e55-6d3b9c018a74"]]}},"additionalProperties":false,"required":["ids"]},"createPlaceholdersInput":{"type":"object","properties":{"placeholders":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the placeholder. Required, and unique within the tenant. A blank name fails the call with NAME_REQUIRED. A name another placeholder already has fails with DUPLICATE_NAME."},"weeklyWorkingHours":{"type":"string","format":"decimal","description":"The weekly working hours used for planning, as a non-negative number of hours, for example 40.00. Omitted or zero stores no hours."}},"additionalProperties":false,"required":["name"]},"description":"The placeholders to create. Send at least one. Either all are created, or none are.","examples":[[{"name":"Unassigned Backend Engineer","weeklyWorkingHours":"40.00"},{"name":"Unassigned Designer"}]]}},"additionalProperties":false,"required":["placeholders"]},"updatePsaProjectOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePsaProjectInput":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the project."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The project start date. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The project end date. Format YYYY-MM-DD."},"teamStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The team assignment start date. Format YYYY-MM-DD."},"teamEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The team assignment end date. Format YYYY-MM-DD. Send null to remove it, so time and expenses stay open indefinitely."},"teamLeadIds":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"The numeric identifiers of the employees to set as project and team leads. This replaces the current set of leads. The list can't be empty. There is no endpoint for them."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the underlying timetracking project is active."},"notifyProjectLeads":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether to notify the project leads."},"category":{"enum":["Billable","Internal","NonBillable"],"description":"The project category. Accepted values: 'Billable', 'Internal', 'NonBillable'."},"status":{"enum":["Tentative","Planning","PlanningDraft","NotStarted","InProgress","Paused","Completed","Cancelled"],"description":"The project status. Accepted values: 'Tentative', 'Planning', 'PlanningDraft', 'NotStarted', 'InProgress', 'Paused', 'Completed', 'Cancelled'."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project's default currency. Format ISO 4217, for example 'USD'."},"budgetAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The project budget amount, in budgetCurrency."},"budgetCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of budgetAmount. Format ISO 4217, for example 'USD'. It should match the project's default currency."},"departmentId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the department to allocate the project to. GET people/departments/:id takes a UUID, so the number cannot be used to fetch the department."},"entityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the legal entity the project belongs to. While the project has a sales arrangement, it must be the arrangement's entity, and null resets it to that entity; a different value fails with the message 'The project's entity must match the entity of its sales arrangement'. Without a sales arrangement, null clears it. When salesArrangementId changes and entityId is not sent, the entity follows the new sales arrangement."},"customerId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of a customer to link directly to the project. It is forced to null whenever a sales arrangement is set. GET accounting/customers/:id takes a UUID, so the number cannot be used to fetch the customer."},"enforceActivityDateRange":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether time entries must fall within the project's startDate and endDate."},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the project is marked as invoiced."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes about the project.","examples":["Kickoff moved to next sprint."]},"opportunityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of a CRM opportunity linked to the project. GET crm/opportunities/:id takes a UUID, so the number cannot be used to fetch the opportunity."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A code for the project."},"quoteId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of a CRM quote linked to the project. GET crm/quotes/:id takes a UUID, so the number cannot be used to fetch the quote."},"salesArrangementId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of a sales arrangement that links the project to billing terms. There is no endpoint for it. Changing or removing it fails with INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED when a linked position, milestone, or fixed fee has already been invoiced."},"salesRepresentativeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the sales representative, an employee. There is no endpoint for it."},"projectTypeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the project type. GET psa/project-types/:id takes a UUID, so the number cannot be used to fetch the project type."},"externalLink":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A link to an external system for this project."},"projectSettings":{"anyOf":[{"type":"object","properties":{"projectSettingsId":{"anyOf":[{"type":"number"},{"type":"null"}]},"disableTimetrackingOnHolidays":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"disableTimetrackingOnWeekends":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"maxHoursPerDay":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}]},"maxHoursPerMonth":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}]},"maxHoursPerWeek":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}]},"billableHoursPerDay":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}]},"notifyNewMembers":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"requireNotes":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}],"description":"The timetracking settings for the project. Updated when projectSettingsId is given, otherwise a new settings record is created."}},"additionalProperties":false},"deleteTimeEntriesOutput":{"type":"object","properties":{},"additionalProperties":false},"deleteTimeEntriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the time entries to delete.","examples":[["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]]}},"additionalProperties":false,"required":["ids"]},"getPsaProjectOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the project.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the project last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-12T09:30:00.000Z"]},"name":{"type":"string","description":"The display name of the project.","examples":["Spire Digital Rollout"]},"code":{"type":"string","description":"The project code, for example 'PSA-29767'. Absent when none has been set.","examples":["PSA-29767"]},"category":{"type":"string","description":"The project category. Possible values: 'Billable', 'Internal', 'NonBillable'.","examples":["Billable"]},"status":{"type":"string","description":"The project status. Possible values: 'Tentative', 'Planning', 'PlanningDraft', 'NotStarted', 'InProgress', 'Paused', 'Completed', 'Cancelled'.","examples":["NotStarted"]},"currency":{"type":"string","description":"The project's default currency. Format ISO 4217, for example 'USD'. It applies to revenueRecordedTimeToDate, revenueAccomplishedMilestones, revenueFixedFeeToDate, revenueToDate, and budgetRemaining.","examples":["USD"]},"invoiced":{"type":"boolean","description":"Whether the project is marked as invoiced.","examples":[false]},"startDate":{"type":"string","format":"date","description":"The project start date. Format YYYY-MM-DD.","examples":["2026-08-03"]},"endDate":{"type":"string","format":"date","description":"The project end date. Format YYYY-MM-DD.","examples":["2026-12-18"]},"notes":{"type":"string","description":"Free-form notes about the project."},"enforceActivityDateRange":{"type":"boolean","description":"Whether time entries must fall within the project's startDate and endDate."},"budgetAmount":{"type":"string","format":"decimal","description":"The project budget amount, in budgetCurrency."},"budgetCurrency":{"type":"string","description":"The currency of budgetAmount. Format ISO 4217, for example 'USD'."},"departmentId":{"type":"number","description":"The numeric identifier of the department the project is allocated to. GET people/departments/:id takes a UUID, so the number cannot be used to fetch the department."},"teamId":{"type":"number","description":"The numeric identifier of the team assigned to this project. GET people/teams/:id takes a UUID, so the number cannot be used to fetch the team.","examples":[89969]},"teamName":{"type":"string","description":"The display name of the team."},"teamStartDate":{"type":"string","format":"date","description":"The team's start date, which may differ from startDate. Format YYYY-MM-DD."},"teamEndDate":{"type":"string","format":"date","description":"The team's end date, which may differ from endDate. Format YYYY-MM-DD."},"salesRepresentativeId":{"type":"number","description":"The numeric identifier of the sales representative, an employee. There is no endpoint for it."},"salesRepresentativeName":{"type":"string","description":"The display name of the sales representative."},"projectTypeId":{"type":"number","description":"The numeric identifier of the project type. GET psa/project-types/:id takes a UUID, so the number cannot be used to fetch the project type."},"projectTypeName":{"type":"string","description":"The display name of the project type."},"quoteId":{"type":"number","description":"The numeric identifier of the CRM quote this project was created from. GET crm/quotes/:id takes a UUID, so the number cannot be used to fetch the quote."},"quoteNumber":{"type":"string","description":"The quote number."},"opportunityId":{"type":"number","description":"The numeric identifier of the CRM opportunity this project is linked to. GET crm/opportunities/:id takes a UUID, so the number cannot be used to fetch the opportunity."},"opportunityName":{"type":"string","description":"The display name of the opportunity."},"opportunityCurrency":{"type":"string","description":"The currency of the opportunity. Format ISO 4217, for example 'USD'."},"salesArrangementId":{"type":"number","description":"The numeric identifier of the sales arrangement that links the project to billing terms. There is no endpoint for it."},"salesArrangementCurrency":{"type":"string","description":"The functional currency of the sales arrangement. Format ISO 4217, for example 'USD'."},"salesArrangementCustomerId":{"type":"number","description":"The numeric identifier of the customer on the sales arrangement. GET accounting/customers/:id takes a UUID, so the number cannot be used to fetch the customer."},"salesArrangementCustomerName":{"type":"string","description":"The display name of the customer on the sales arrangement."},"salesArrangementEntityId":{"type":"number","description":"The numeric identifier of the legal entity on the sales arrangement. There is no endpoint for it."},"salesArrangementEntityName":{"type":"string","description":"The display name of the legal entity on the sales arrangement."},"revenueRecordedTimeToDate":{"type":"string","format":"decimal","description":"The revenue from recorded time up to today, in the project currency. Absent when the project has no time entries."},"revenueAccomplishedMilestones":{"type":"string","format":"decimal","description":"The revenue from accomplished and invoiced milestones, in the project currency. Absent when the project has no completed milestones."},"revenueFixedFeeToDate":{"type":"string","format":"decimal","description":"The fixed-fee revenue to date, in the project currency. Absent when the project has no fixed fees."},"revenueToDate":{"type":"string","format":"decimal","description":"The total revenue to date, in the project currency: revenueRecordedTimeToDate + revenueAccomplishedMilestones + revenueFixedFeeToDate."},"budgetRemaining":{"type":"string","format":"decimal","description":"The budget remaining, in the project currency: budgetAmount - revenueToDate."}},"additionalProperties":false,"required":["id","lastModifiedDate","name","category","status","currency","invoiced","startDate","endDate","teamId"]},"projectsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the project."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the project last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the project."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project code, for example 'PSA-29767'. Absent when none has been set."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project category. Possible values: 'Billable', 'Internal', 'NonBillable'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project status. Possible values: 'Tentative', 'Planning', 'PlanningDraft', 'NotStarted', 'InProgress', 'Paused', 'Completed', 'Cancelled'."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project's default currency. Format ISO 4217, for example 'USD'. It applies to revenueRecordedTimeToDate, revenueAccomplishedMilestones, revenueFixedFeeToDate, revenueToDate, and budgetRemaining."},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the project is marked as invoiced."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The project start date. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The project end date. Format YYYY-MM-DD."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes about the project."},"enforceActivityDateRange":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether time entries must fall within the project's startDate and endDate."},"budgetAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The project budget amount, in budgetCurrency."},"budgetCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of budgetAmount. Format ISO 4217, for example 'USD'."},"departmentId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the department the project is allocated to. GET people/departments/:id takes a UUID, so the number cannot be used to fetch the department."},"teamId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the team assigned to this project. GET people/teams/:id takes a UUID, so the number cannot be used to fetch the team."},"teamName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the team."},"teamStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The team's start date, which may differ from startDate. Format YYYY-MM-DD."},"teamEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The team's end date, which may differ from endDate. Format YYYY-MM-DD."},"salesRepresentativeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the sales representative, an employee. There is no endpoint for it."},"salesRepresentativeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the sales representative."},"projectTypeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the project type. GET psa/project-types/:id takes a UUID, so the number cannot be used to fetch the project type."},"projectTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the project type."},"quoteId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the CRM quote this project was created from. GET crm/quotes/:id takes a UUID, so the number cannot be used to fetch the quote."},"quoteNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The quote number."},"opportunityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the CRM opportunity this project is linked to. GET crm/opportunities/:id takes a UUID, so the number cannot be used to fetch the opportunity."},"opportunityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the opportunity."},"opportunityCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the opportunity. Format ISO 4217, for example 'USD'."},"salesArrangementId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the sales arrangement that links the project to billing terms. There is no endpoint for it."},"salesArrangementCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The functional currency of the sales arrangement. Format ISO 4217, for example 'USD'."},"salesArrangementCustomerId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the customer on the sales arrangement. GET accounting/customers/:id takes a UUID, so the number cannot be used to fetch the customer."},"salesArrangementCustomerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the customer on the sales arrangement."},"salesArrangementEntityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the legal entity on the sales arrangement. There is no endpoint for it."},"salesArrangementEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the legal entity on the sales arrangement."},"revenueRecordedTimeToDate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue from recorded time up to today, in the project currency. Absent when the project has no time entries."},"revenueAccomplishedMilestones":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue from accomplished and invoiced milestones, in the project currency. Absent when the project has no completed milestones."},"revenueFixedFeeToDate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The fixed-fee revenue to date, in the project currency. Absent when the project has no fixed fees."},"revenueToDate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total revenue to date, in the project currency: revenueRecordedTimeToDate + revenueAccomplishedMilestones + revenueFixedFeeToDate."},"budgetRemaining":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The budget remaining, in the project currency: budgetAmount - revenueToDate."}},"additionalProperties":false},"activitiesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the activity.","examples":["c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"]},"name":{"type":"string","description":"The display name of the activity.","examples":["Discovery workshop"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the activity. Absent when none was set.","examples":["Two-day onsite requirements workshop."]},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The budgeted hours for this activity, as a count of hours. It is not a monetary amount.","examples":["40.00"]},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the activity is billable to a customer. Derived from category being 'ClientBillable'.","examples":[true]},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the activity has been invoiced.","examples":[false]},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The activity's start date. Format YYYY-MM-DD. It is within the owning project's date range when the project's enforceActivityDateRange setting is on.","examples":["2026-09-01"]},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The activity's end date. Format YYYY-MM-DD.","examples":["2026-09-02"]},"billingType":{"type":"string","description":"The activity's billing type. Possible values: 'Hours', 'Milestone', 'FixedFee'.","examples":["Hours"]},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The activity's category. Possible values: 'ClientBillable', 'NonBillable', 'NonValuable', 'Valuable'.","examples":["ClientBillable"]},"milestoneId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the milestone this activity is billed against. Absent unless billingType is 'Milestone'. It is a numeric key, not the UUID that GET psa/milestones/:id takes."},"fixedFeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the fixed fee this activity is billed against. Absent unless billingType is 'FixedFee'. It is a numeric key, not the UUID that GET psa/fixed-fees/:id takes."},"activityStatusId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the activity's progress status. Absent when no status is set. Status values are tenant-configured, and there is no endpoint that lists them. Use statusName for the label.","examples":[3]},"statusName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the activity's progress status, for example 'In progress'. Absent when no status is set.","examples":["In progress"]},"parentActivityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the parent activity when this is a sub-task. Absent when the activity is top-level. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"psaProjectId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the PSA project that owns this activity. Absent for a timetracking project with no PSA layer. It is a numeric key you can filter on here, but not the UUID that GET psa/projects/:id takes.","examples":[32341]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time this activity last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"deleteProjectTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"createPsaProjectOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created project.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createPsaProjectInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name for the project.","examples":["Acme Rollout"]},"startDate":{"type":"string","format":"date","description":"The project start date. Format YYYY-MM-DD.","examples":["2026-09-01"]},"endDate":{"type":"string","format":"date","description":"The project end date. Format YYYY-MM-DD.","examples":["2027-03-01"]},"teamStartDate":{"type":"string","format":"date","description":"The team assignment start date. Defaults to startDate when omitted. Format YYYY-MM-DD."},"teamEndDate":{"type":"string","format":"date","description":"The team assignment end date. Defaults to endDate when omitted. Format YYYY-MM-DD."},"teamLeadIds":{"type":"array","items":{"type":"number"},"description":"The numeric identifiers of the employees to assign as project and team leads. You must send the list, but it can be empty. There is no endpoint for them.","examples":[[3845142]]},"notifyProjectLeads":{"type":"boolean","description":"Whether to notify the assigned project leads."},"category":{"enum":["Billable","Internal","NonBillable"],"description":"The project category. Accepted values: 'Billable', 'Internal', 'NonBillable'.","examples":["Billable"]},"status":{"enum":["Tentative","Planning","PlanningDraft","NotStarted","InProgress","Paused","Completed","Cancelled"],"description":"The initial project status. Accepted values: 'Tentative', 'Planning', 'PlanningDraft', 'NotStarted', 'InProgress', 'Paused', 'Completed', 'Cancelled'.","examples":["NotStarted"]},"currency":{"type":"string","description":"The project's default currency. Format ISO 4217, for example 'USD'.","examples":["USD"]},"budgetAmount":{"type":"string","format":"decimal","description":"The project budget amount, in budgetCurrency."},"budgetCurrency":{"type":"string","description":"The currency of budgetAmount. Format ISO 4217, for example 'USD'. It should match the project's default currency."},"departmentId":{"type":"number","description":"The numeric identifier of the department to allocate the project to. GET people/departments/:id takes a UUID, so the number cannot be used to fetch the department."},"entityId":{"type":"number","description":"The numeric identifier of the legal entity the project belongs to. When salesArrangementId is set, it defaults to the sales arrangement's entity, and a different value fails with the message 'The project's entity must match the entity of its sales arrangement'. GET base/entities lists entities by UUID, so the number cannot be used to look the entity up there."},"customerId":{"type":"number","description":"The numeric identifier of a customer to link directly to the project. It is ignored when salesArrangementId is set. GET accounting/customers/:id takes a UUID, so the number cannot be used to fetch the customer."},"enforceActivityDateRange":{"type":"boolean","description":"Whether time entries must fall within the project's startDate and endDate."},"invoiced":{"type":"boolean","description":"Whether to mark the project as invoiced. Defaults to false."},"notes":{"type":"string","description":"Free-form notes about the project."},"opportunityId":{"type":"number","description":"The numeric identifier of a CRM opportunity to link to the project. GET crm/opportunities/:id takes a UUID, so the number cannot be used to fetch the opportunity."},"code":{"type":"string","description":"A code for the project."},"quoteId":{"type":"number","description":"The numeric identifier of the CRM quote the project is created from. GET crm/quotes/:id takes a UUID, so the number cannot be used to fetch the quote."},"salesArrangementId":{"type":"number","description":"The numeric identifier of a sales arrangement that links the project to billing terms. When set, the direct customerId link is not persisted. There is no endpoint for it."},"salesRepresentativeId":{"type":"number","description":"The numeric identifier of the sales representative, an employee. There is no endpoint for it."},"projectTypeId":{"type":"number","description":"The numeric identifier of the project type. GET psa/project-types/:id takes a UUID, so the number cannot be used to fetch the project type."},"externalLink":{"type":"string","description":"A link to an external system for this project."},"projectSettings":{"type":"object","properties":{"disableTimetrackingOnHolidays":{"type":"boolean"},"disableTimetrackingOnWeekends":{"type":"boolean"},"maxHoursPerDay":{"type":"string","format":"decimal"},"maxHoursPerMonth":{"type":"string","format":"decimal"},"maxHoursPerWeek":{"type":"string","format":"decimal"},"billableHoursPerDay":{"type":"string","format":"decimal"},"notifyNewMembers":{"type":"boolean"},"requireNotes":{"type":"boolean"}},"additionalProperties":false,"description":"The timetracking settings for the project. Created only when at least one setting is provided."}},"additionalProperties":false,"required":["name","startDate","endDate","teamLeadIds","category","status","currency"]},"createAllocationsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created allocation."}},"additionalProperties":false,"required":["id"]},"description":"The created allocations, in the order the request sent them. Read a record with GET psa/allocations/:id for its stored state.","examples":[[{"id":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"}]]}},"additionalProperties":false,"required":["created"]},"createAllocationsInput":{"type":"object","properties":{"allocations":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number","description":"The id of the timetracking member assignment the daily hours are booked against. It determines the project, the person, and the permission check. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"projectActivityId":{"type":"number","description":"The id of the project activity the allocation is booked against. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"startDate":{"type":"string","format":"date","description":"The first day of the allocation period, inclusive. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the allocation period, inclusive. Use format YYYY-MM-DD."},"totalHours":{"type":"string","format":"decimal","description":"The planned hours, interpreted according to method. For 'totalHours' and 'hoursPerDay', this is the total for the whole period, spread evenly over the working days in range. For 'hoursPerWeek', it is the period total, divided across the weeks and then the working days. For 'hoursPerMonth', it is a per-month rate, with a working month approximated as 21 days. Days that compute to zero hours produce no daily entry."},"method":{"enum":["totalHours","hoursPerDay","hoursPerWeek","hoursPerMonth"],"description":"The distribution method for the planned hours."},"notes":{"type":"string","description":"Free-form notes stored on the allocation."},"workingDays":{"type":"array","items":{"enum":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"description":"The days of the week the allocation applies to."},"psaProjectId":{"type":"number","description":"The id of the PSA project the allocation belongs to. It must be the project the member belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes."}},"additionalProperties":false,"required":["memberId","projectActivityId","startDate","endDate","totalHours","method","psaProjectId"]},"description":"The allocations to create.","examples":[[{"memberId":4021,"projectActivityId":91,"startDate":"2026-09-01","endDate":"2026-09-12","totalHours":"40.00","method":"totalHours","psaProjectId":32341},{"memberId":4022,"projectActivityId":91,"startDate":"2026-10-01","endDate":"2026-12-31","totalHours":"160.00","method":"hoursPerWeek","psaProjectId":32341,"notes":"Phase 2 delivery capacity.","workingDays":["Monday","Tuesday","Wednesday","Thursday"]}]]}},"additionalProperties":false,"required":["allocations"]},"getActivityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the activity.","examples":["c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"]},"name":{"type":"string","description":"The display name of the activity.","examples":["Discovery workshop"]},"description":{"type":"string","description":"A free-form description of the activity. Absent when none was set.","examples":["Two-day onsite requirements workshop."]},"hoursBudget":{"type":"string","format":"decimal","description":"The budgeted hours for this activity, as a count of hours. It is not a monetary amount.","examples":["40.00"]},"billable":{"type":"boolean","description":"Whether the activity is billable to a customer. Derived from category being 'ClientBillable'.","examples":[true]},"invoiced":{"type":"boolean","description":"Whether the activity has been invoiced.","examples":[false]},"startDate":{"type":"string","format":"date","description":"The activity's start date. Format YYYY-MM-DD. It is within the owning project's date range when the project's enforceActivityDateRange setting is on.","examples":["2026-09-01"]},"endDate":{"type":"string","format":"date","description":"The activity's end date. Format YYYY-MM-DD.","examples":["2026-09-02"]},"billingType":{"type":"string","description":"The activity's billing type. Possible values: 'Hours', 'Milestone', 'FixedFee'.","examples":["Hours"]},"category":{"type":"string","description":"The activity's category. Possible values: 'ClientBillable', 'NonBillable', 'NonValuable', 'Valuable'.","examples":["ClientBillable"]},"milestoneId":{"type":"number","description":"The id of the milestone this activity is billed against. Absent unless billingType is 'Milestone'. It is a numeric key, not the UUID that GET psa/milestones/:id takes."},"fixedFeeId":{"type":"number","description":"The id of the fixed fee this activity is billed against. Absent unless billingType is 'FixedFee'. It is a numeric key, not the UUID that GET psa/fixed-fees/:id takes."},"activityStatusId":{"type":"number","description":"The id of the activity's progress status. Absent when no status is set. Status values are tenant-configured, and there is no endpoint that lists them. Use statusName for the label.","examples":[3]},"statusName":{"type":"string","description":"The name of the activity's progress status, for example 'In progress'. Absent when no status is set.","examples":["In progress"]},"parentActivityId":{"type":"number","description":"The id of the parent activity when this is a sub-task. Absent when the activity is top-level. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"psaProjectId":{"type":"number","description":"The id of the PSA project that owns this activity. Absent for a timetracking project with no PSA layer. It is a numeric key you can filter on here, but not the UUID that GET psa/projects/:id takes.","examples":[32341]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this activity last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id","name","billingType","lastModifiedDate"]},"submitTimeEntriesOutput":{"type":"object","properties":{"submitted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entry."}},"additionalProperties":false,"required":["id"]},"description":"The entries whose status was set to pending.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}]]}},"additionalProperties":false,"required":["submitted"]},"submitTimeEntriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the time entries to submit for approval.","examples":[["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]]}},"additionalProperties":false,"required":["ids"]},"updatePlaceholderOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePlaceholderInput":{"type":"object","properties":{"name":{"type":"string","description":"A new display name. Omit to leave it unchanged. Must be unique within the tenant. A blank name fails with NAME_REQUIRED, and a name another placeholder already has fails with DUPLICATE_NAME."},"weeklyWorkingHours":{"type":"string","format":"decimal","description":"New weekly working hours, as a non-negative number of hours, for example 32.00. Omit to leave the stored value unchanged. A zero is stored as zero.","examples":["32.00"]}},"additionalProperties":false},"createAccountingProductOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created product."}},"additionalProperties":false,"required":["id"]},"createAccountingProductInput":{"type":"object","properties":{"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant. A code another product already uses fails with DUPLICATE_PRODUCT_CODE."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Use format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The date the product is no longer available. Use format YYYY-MM-DD. Omit for a product with no end date."},"productFamily":{"type":"string","description":"The product family. Accepted values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"The product type. Accepted values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"description":{"type":"string","description":"A description of the product shown to customers."},"internalDescription":{"type":"string","description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"type":"string","description":"The product's identifier in an external CRM system."},"isInventory":{"type":"boolean","description":"Whether the product is tracked as inventory. Defaults to false."},"itemIds":{"type":"array","items":{"type":"string"},"description":"The inventory items to link to this product. Used only when isInventory is true. See id on GET inventory/items/:id."},"entityId":{"type":"string","description":"The legal entity this product is scoped to. See id on GET base/entities. Omit to default to your current entity when entity-based visibility is enabled, otherwise the product is shared across all entities."},"productLines":{"type":"array","items":{"type":"object","properties":{"lineType":{"type":"string","description":"The type of product line. Accepted values: 'recurring', 'oneTime', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'. 'usage' is not accepted and fails with UNSUPPORTED_LINE_TYPE, because 'usage' lines are only created automatically with their parent line. 'commitWithOverage' is not supported and fails with VALIDATION_FAILED."},"priceModel":{"type":"string","description":"How the product line is priced. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"name":{"type":"string","description":"A name for the product line. Omit to have one generated."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Accepted values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Accepted values: 'allowNegative', 'overage'. 'allowNegative' lets the balance go negative and takes the shortfall from the new prepaid amount at renewal. 'overage' stops the balance at 0 and invoices further usage at the line's overage rate."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."},"engine":{"type":"string","description":"The tax engine that computes this tax. Accepted values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."}},"additionalProperties":false,"required":["taxCode","entityId","engine"]},"description":"The tax records to attach to the product line. Provide only when a tax provider is configured."},"priceBookHeadersToCreate":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. Required when the product line is priced 'flat' or 'perUnit'."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Omit on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["unitOfMeasure"],"description":"The rate-card entry to attach. Provide only on rate-card-priced entries."}},"additionalProperties":false},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","priceBookEntries"]},"description":"The pricing headers to create for the product line."},"priceBookHeadersForUsage":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this rate-card entry, in the header currency."}},"additionalProperties":false,"required":["usageType","unitOfMeasure"]},"description":"The rate-card entries on the header. Pricing of a 'usage' line is always rate-card based."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","rateCardEntries"]},"description":"The pricing for the paired 'usage' line that the API creates. Provide only when lineType is 'prepaid', or when lineType is 'recurring' and priceModel is 'thresholdBased'. On any other line the request fails with USAGE_PRICING_NOT_APPLICABLE."}},"additionalProperties":false,"required":["lineType","priceModel","unitOfMeasure"]},"description":"The product lines to create with this product, each with optional pricing. A 'prepaid' line, or a 'recurring' line whose priceModel is 'thresholdBased', also creates a paired 'usage' line. Provide the pricing of the paired 'usage' line in priceBookHeadersForUsage."}},"additionalProperties":false,"required":["productName","productCode","effectiveStartDate"]},"createJournalEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created journal entry."}},"additionalProperties":false,"required":["id"]},"createJournalEntryInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the journal entry."},"description":{"type":"string","description":"A free-form description of the journal entry."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Use format YYYY-MM-DD. Each line takes this as its transaction date."},"reversalDate":{"type":"string","format":"date","description":"The reversal date recorded on the header. Use format YYYY-MM-DD. This does not post a reversal. To post one, use POST accounting/journal-entries/:id/reverse."},"reversalReason":{"type":"string","description":"The reason recorded on the header for a later reversal. Accepted values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'. Any other value fails with INVALID_REVERSAL_REASON."},"reversalDescription":{"type":"string","description":"A free-form reversal description recorded on the header."},"url":{"type":"string","description":"A link to the source document this entry comes from."},"bookId":{"type":"string","description":"The accounting book this entry posts to. See id on GET accounting/books/:id."},"deriveToAllBooks":{"type":"boolean","description":"Whether to replicate the entry to every accounting book. Defaults to false. Has no effect unless multi-book accounting is enabled."},"lines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"transactionalCurrency":{"type":"string","description":"The currency of this line's debit or credit amount. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"A free-form description of the line."},"intercompanyPartnerId":{"type":"string","description":"The intercompany counterparty for this line. Set on intercompany lines."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate from the line's transactionalCurrency to the entity's functional currency. It applies only when the two currencies differ. For a same-currency line it is 1 and any value you send is ignored. When you omit it on a foreign-currency line, it defaults to the latest rate on or before the posting date."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a department record when dimensionCode is 'department'. It must be an existing, active record. For a custom dimension, send the value's modelUuid from listCustomDimensionValues, not its integer modelId."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for this line, one per reporting dimension. Each tag pairs a dimensionCode with a modelId. A line has at most one tag per dimensionCode. The referenced record must exist and be active, or the request fails with REFERENCED_RECORD_NOT_FOUND. Omit or send an empty array for an untagged line."}},"additionalProperties":false,"required":["accountId","entityId","transactionalCurrency"]},"description":"The debit and credit lines of the entry. Each line is a debit or a credit in its transactionalCurrency."}},"additionalProperties":false,"required":["name","postingDate","bookId","lines"]},"updateBankEntryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankEntryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the entry is posted under. See id on GET base/entities."},"bankAccountId":{"type":"string","description":"The general-ledger account behind the bank account this entry posts against. See id on GET accounting/accounts/:id."},"transactionDate":{"type":"string","format":"date","description":"The date the transaction took place. Use format YYYY-MM-DD. Changing it re-resolves the posting period."},"currency":{"type":"string","description":"The currency of the entry. Format ISO 4217, for example 'USD'. When supplied it must match the account's currency."},"status":{"type":"string","description":"The reconciliation status. Accepted values: 'matched', 'unmatched', 'voided', 'integrated'."},"name":{"type":"string","description":"A short name for the entry.","examples":["February bank fees — revised"]},"description":{"type":"string","description":"A free-form description of the entry."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD."},"origin":{"type":"string","description":"The system or process the entry originated from."},"externalUrl":{"type":"string","description":"A link to the entry in the originating system."},"createLines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage is supplied. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this new line over, one per accounting book. A plain array because the line does not exist yet, so there is nothing to change or remove. Only a prepaid line may carry them."}},"additionalProperties":false,"required":["accountId","amount"]},"description":"Lines to add. Each has the same shape as a line on create, with no id because the line does not exist yet.","examples":[[{"accountId":"9994c3ed-f812-44c1-9454-7f36b2bfb0fb","amount":"-25.00","description":"Wire fee"}]]},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this bank entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage is supplied. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book. A book the line already has a schedule for is refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this line, one per accounting book it does not already have one for. Omit all three amortization arrays to leave the line's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the schedule to change. It must be one this line already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by its id and belonging to this line. Every field but the id is optional. Changing the dates without the term, or the term without the dates, is refused with AMORTIZATION_TERM_MISMATCH when the two would disagree."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this line. Each must be one this line already carries. The schedule is deleted, not merely unlinked."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by its id. Every field but the id is optional, and omitting one leaves that field unchanged.","examples":[[{"id":"7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9","amount":"-150.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove. Each must belong to this bank entry.","examples":[["1f2e3d4c-5b6a-7089-9a8b-7c6d5e4f3a2b"]]}},"additionalProperties":false},"searchBankAccountOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account."},"externalAccountId":{"type":"string","description":"The identifier this account has in the bank or aggregator it was connected from. Unique within the tenant."},"externalAccountName":{"type":"string","description":"The account name as reported by the bank or aggregator."},"externalDescription":{"type":"string","description":"The account description as reported by the bank or aggregator."},"type":{"type":"string","description":"The kind of account, as free-form text. For example 'checking', 'saving' or 'creditCard'."},"currency":{"type":"string","description":"The currency the account is held in. Format ISO 4217, for example 'USD'. balance is in this currency."},"balance":{"type":"string","format":"decimal","description":"The current account balance, in currency."},"mask":{"type":"string","description":"A masked form of the account number, for example '****1234'. Display it instead of reference where the full number is not needed."},"reference":{"type":"string","description":"The full account number, the IBAN or the ACH account number."},"referenceType":{"type":"string","description":"How referenceNumber is structured. Possible values: 'QRR', 'SCOR', 'NON'. 'QRR' is a Swiss QR reference, 'SCOR' an ISO 11649 creditor reference, and 'NON' none."},"referenceNumber":{"type":"string","description":"A structured payment reference for payments to this account, interpreted per referenceType."},"bankAccountCode":{"type":"string","description":"The bank identifier, the SWIFT/BIC code or the US routing number."},"bankAccountHolderName":{"type":"string","description":"The name the account is held in. This is personal data."},"paymentAllowed":{"type":"boolean","description":"Whether payments may be made from this account."},"receivableAccount":{"type":"boolean","description":"Whether this account may be used to receive money."},"payableAccount":{"type":"boolean","description":"Whether this account may be used to pay money out."},"isReady":{"type":"boolean","description":"Whether the account is fully set up and usable."},"reconciliationStartDate":{"type":"string","format":"date","description":"The date from which this account is reconciled. Format YYYY-MM-DD. Transactions before it are not reconciled."},"transactionsImportDate":{"type":"string","format":"date","description":"The date from which transactions are imported for this account. Format YYYY-MM-DD."},"accountId":{"type":"string","description":"The chart-of-accounts account this bank account is linked to. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the linked chart-of-accounts account."},"accountNumber":{"type":"string","description":"The number of the linked chart-of-accounts account. This is a general-ledger account number, not the bank account number, which is reference."},"bankName":{"type":"string","description":"The name of the bank this account is held at."},"financialInstitutionId":{"type":"string","description":"The financial institution this account is held at. There is no endpoint for it."},"entityId":{"type":"string","description":"The legal entity that owns this account. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this account."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank account last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","externalAccountId","paymentAllowed","reconciliationStartDate","lastModifiedDate"]},"description":"The bank accounts on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchBankAccountInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the bank account with this identifier."},"externalAccountId":{"type":"string","description":"Limits results to the bank account with this external identifier. It is unique within the tenant, so at most one account matches."},"externalAccountName":{"type":"string","description":"Limits results to bank accounts with this external account name. The match is exact."},"accountId":{"type":"string","description":"Limits results to the bank account linked to this chart-of-accounts account. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"Limits results to bank accounts whose linked chart-of-accounts account has this name. The match is exact."},"accountNumber":{"type":"string","description":"Limits results to bank accounts whose linked chart-of-accounts account has this number. This is a general-ledger number, not a bank account number. The match is exact."},"entityId":{"type":"string","description":"Limits results to bank accounts owned by this legal entity. See id on GET base/entities."},"financialInstitutionId":{"type":"string","description":"Limits results to bank accounts held at this financial institution. There is no endpoint for it."},"type":{"type":"string","description":"Limits results to bank accounts of this kind, for example 'checking'. The kind is free-form text, so an unknown value matches nothing."},"currency":{"type":"string","description":"Limits results to bank accounts held in this currency. Format ISO 4217, for example 'USD'."},"paymentAllowed":{"type":"boolean","description":"Limits results to accounts payments may be made from when true, and those they may not when false."},"receivableAccount":{"type":"boolean","description":"Limits results to accounts that may receive money when true, and those that may not when false."},"isReady":{"type":"boolean","description":"Limits results to accounts that are fully set up when true, and those that are not when false."}},"additionalProperties":false,"description":"The filters to apply. A bank account must match every filter you send. Omit to return all bank accounts.","examples":[{"type":"checking","paymentAllowed":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of bank accounts per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"updateTaxConfigurationOutput":{"type":"object","properties":{},"additionalProperties":false},"updateTaxConfigurationInput":{"type":"object","properties":{"status":{"enum":["Active","Inactive"],"description":"The new status. Omit to leave it unchanged.","examples":["Inactive"]},"taxRegime":{"enum":["EU_VAT","India_GST","Canada_GST","Ghana_VAT","SingleRate_GST","Mexico_IVA"],"description":"The new tax regime. Omit to leave it unchanged."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for an existing tax code line to update. Omit to create a new line. An id that does not belong to this configuration fails with LINE_NOT_FOUND."},"taxCode":{"type":"string","description":"The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'."},"title":{"type":"string","description":"The display title of the tax code. Must be unique within the configuration."},"comment":{"type":"string","description":"A free-form note on when to use this tax code."},"vatDeclarationField":{"type":"string","description":"The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Stored as free text and not evaluated."},"percentage":{"type":"string","format":"decimal","description":"The tax rate, as a decimal fraction. For example, 0.19 is 19%. Send 0 for a zero-rated or exempt code."},"rateType":{"enum":["Standard","Reduced","SuperReduced","Zero","Exempt"],"description":"The legal rate classification of the tax code."},"scope":{"enum":["Domestic","IntraEU_B2B","IntraEU_B2C","ExtraEU_Goods","ExtraEU_Services"],"description":"The territorial scope of the transaction."},"direction":{"enum":["Input","Output"],"description":"Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales."},"isReverseCharge":{"type":"boolean","description":"Whether the recipient rather than the supplier accounts for the tax. When true, every account on the line must set reverseChargeCreditAccountId."},"cashBasis":{"type":"boolean","description":"Cash basis: the tax becomes creditable only when the bill is paid. It posts to the uncollected account and moves to the collected account on payment. Input tax only. Requires components whose accounts all set collectedAccountId."},"isActive":{"type":"boolean","description":"Whether the tax code is offered for selection on new documents."},"accounts":{"type":"array","items":{"type":"object","properties":{"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount. Required on reverse-charge lines, ignored otherwise. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["chartOfAccountsId","accountId"]},"description":"The general ledger accounts this tax code books to, usually one entry for each chart of accounts the entity books in. Must not be empty, including for exempt and zero-rated codes, which book a tax line at zero."},"components":{"type":"array","items":{"type":"object","properties":{"taxComponentCode":{"type":"string","description":"The tax component code, for example 'VAT'."},"percentage":{"type":"string","format":"decimal","description":"The component's rate as a decimal fraction, for example 0.16 for 16%."},"isRecoverable":{"type":"boolean","description":"Whether the tax can be reclaimed. Every component of a cash-basis code must set true."},"accounts":{"type":"array","items":{"type":"object","properties":{"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. On a cash-basis code this is the uncollected account. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount on a reverse-charge code. See id on GET accounting/accounts/:id."},"collectedAccountId":{"type":"string","description":"Cash basis only. The account the tax moves to once the bill is paid. Required on every account of a cash-basis component, and must differ from accountId. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["chartOfAccountsId","accountId"]},"description":"The GL accounts for this component, one entry per chart of accounts the entity books in. Must not be empty."}},"additionalProperties":false,"required":["taxComponentCode","percentage","isRecoverable","accounts"]},"description":"The tax components of this code, for example a federal and a state part. Required when cashBasis is true. The components' percentages must add up to the line's percentage."}},"additionalProperties":false,"required":["title","percentage","rateType","scope","direction","isReverseCharge","isActive","accounts"]},"description":"The replacement set of tax codes. Omit to leave every existing tax code unchanged. When supplied it replaces the whole set: a line with an id updates that tax code, a line without one creates a tax code, and any existing line not in the array is deleted with its accounts. Must not be empty when supplied."}},"additionalProperties":false},"listUsageOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the usage record."},"usageNumber":{"type":"string","description":"The usage number, unique within the tenant. Absent while none has been assigned."},"usageIdentifier":{"type":"string","description":"The external identifier for this usage record, as supplied at ingestion."},"date":{"type":"string","format":"date-time","description":"The date and time the usage occurred, without a time zone. Format YYYY-MM-DDTHH:mm:ss."},"description":{"type":"string","description":"A free-form description of the usage record. Absent when none is set."},"productIdentifier":{"type":"string","description":"The product code or identifier this usage is attributed to, as supplied at ingestion."},"billableComponentId":{"type":"string","description":"The billable component this usage is attributed to. Absent until it is resolved. There is no endpoint for it."},"usageComponent":{"type":"string","description":"The billable component's name or identifier, included so you do not need a second read."},"quantity":{"type":"string","format":"decimal","description":"The quantity of usage recorded, in unitOfMeasure."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit for this usage. This record has no currency field. The currency is on the subscription or contract this usage bills against."},"status":{"type":"string","description":"The lifecycle status of the usage record. Possible values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'."},"usagePeriodId":{"type":"string","description":"The unique identifier for the usage period this record belongs to. There is no endpoint for it."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"Custom data recorded on this usage record, as a JSON object. Absent when none was set."},"orderIndex":{"type":"number","description":"The position of this usage record within the batch it was created in. Absent when not known."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the usage record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","date","quantity","unitPrice","status","usagePeriodId","lastModifiedDate"]},"description":"The usage records on this page, newest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more usage records remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"UnknownScalar":{"type":["string","number","boolean"]},"UnknownArray":{"type":"array","items":{"$ref":"#/components/schemas/UnknownValue"}},"UnknownObject":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UnknownValue"}},"UnknownValue":{"oneOf":[{"$ref":"#/components/schemas/UnknownScalar"},{"$ref":"#/components/schemas/UnknownArray"},{"$ref":"#/components/schemas/UnknownObject"}]},"fiscalCalendarsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fiscal calendar."},"calendarName":{"type":"string","description":"The name of the fiscal calendar, unique within the tenant."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the fiscal calendar. Absent when none has been set."},"periodFormat":{"type":"string","description":"How the fiscal calendar divides a fiscal year into periods. Possible values: 'calendarMonths' (twelve monthly periods), '4-4-5', '4-5-4', '5-4-4' (retail quarters of thirteen weeks, split into periods of that many weeks)."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle status of the fiscal calendar. Possible values: 'new', 'active', 'deactivated'. Absent when none has been set."},"fiscalYearsCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of distinct fiscal years on this calendar. Absent until the first fiscal year exists."},"anchorDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The anchor reference date, set only for retail calendars (a '4-4-5', '4-5-4' or '5-4-4' periodFormat). It is the last day of the month before the first period starts. Format YYYY-MM-DD. Absent on a calendarMonths calendar."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fiscal calendar last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getRevenueSchedulingTemplateOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue scheduling template."},"revenueSchedulingTemplateNumber":{"type":"string","description":"The template number, unique within the tenant, for example 'RST-0007'. Absent while none has been assigned."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized under this template. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"revenueSchedulingEvent":{"type":"string","description":"The event that creates a revenue plan under this template. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"amortizationMethod":{"type":"string","description":"How the scheduled amount is spread over the plan's periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. Absent when the recognition pattern does not spread revenue over time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue scheduling template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","revenueSchedulingTemplateName","revenueRecognitionPattern","revenueSchedulingEvent","lastModifiedDate"]},"getCreditMemoOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo."},"creditMemoNumber":{"type":"string","description":"The credit memo number, for example 'CM-1'. Absent while none has been assigned."},"creditMemoDate":{"type":"string","format":"date","description":"The date the credit memo was issued. Format YYYY-MM-DD."},"creditMemoStatus":{"type":"string","description":"The application status of the credit memo. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'."},"creditMemoType":{"type":"string","description":"How the credit memo was created. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn'. Only 'manual' credit memos are created through this API. The rest come from internal workflows."},"manualCreditMemoType":{"type":"string","description":"The reason for a manual credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Absent when creditMemoType is not 'manual'."},"currency":{"type":"string","description":"The currency of the credit memo. Every amount on the record, its lines and its application rows is in this currency. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"A free-form description of the credit memo."},"externalCreditMemoId":{"type":"string","description":"The identifier of this credit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"customerId":{"type":"string","description":"The customer the credit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer the credit memo is issued to."},"customerNumber":{"type":"string","description":"The customer number of the customer the credit memo is issued to."},"entityId":{"type":"string","description":"The legal entity that issued the credit memo. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that issued the credit memo."},"invoiceId":{"type":"string","description":"The invoice the credit memo was created from. Absent when it was not created from an invoice. See id on GET accounting/invoices/:id."},"invoiceNumber":{"type":"string","description":"The number of the invoice the credit memo was created from. Present whenever invoiceId is."},"subtotal":{"type":"string","format":"decimal","description":"The subtotal before tax and duties, in the credit memo currency. Absent when no subtotal has been computed."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the credit memo currency."},"totalDutiesAndCustoms":{"type":"string","format":"decimal","description":"The total duties and customs across all lines, in the credit memo currency."},"totalAmountCredited":{"type":"string","format":"decimal","description":"The total credited, including tax and duties, in the credit memo currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount applied to invoices and debit memos so far, in the credit memo currency. This is the net of the application rows below."},"unappliedAmount":{"type":"string","format":"decimal","description":"The amount still available to apply, in the credit memo currency."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the credit memo last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo line."},"creditMemoLineNumber":{"type":"string","description":"The line number within the credit memo."},"description":{"type":"string","description":"The line description, as shown to the customer."},"productId":{"type":"string","description":"The product credited by the line. Absent on free-text lines. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The product code as it stood when the line was created. It does not follow later changes to the product."},"productDescription":{"type":"string","description":"The product description as it stood when the line was created. It does not follow later changes to the product."},"quantity":{"type":"string","format":"decimal","description":"The quantity credited."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the credit memo currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total before tax and duties, in the credit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the credit memo currency."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs on the line, in the credit memo currency."},"amountCredited":{"type":"string","format":"decimal","description":"The total credited for the line, in the credit memo currency: totalPrice + taxAmount + dutiesAndCustomsAmount."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the credit memo, each crediting one product or free-text item. An empty array when the credit memo has no lines. Every amount is in the credit memo currency."},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the application row."},"appliedAmount":{"type":"string","format":"decimal","description":"The signed amount moved by this row, in the row's currency: positive when applying, negative when unapplying. Sum the rows to reconcile against the header appliedAmount."},"appliedDate":{"type":"string","format":"date","description":"The date the allocation was recorded. Format YYYY-MM-DD."},"actionType":{"type":"string","description":"What this row did. Possible values: 'applied', 'unapplied'."},"type":{"type":"string","description":"The kind of document the credit memo was allocated against. Possible values: 'invoice', 'debitMemo'. Absent when the stored target kind is not one this version recognizes."},"targetId":{"type":"string","description":"The target document: an invoice when type is 'invoice', a debit memo when type is 'debitMemo'. Absent when the target no longer exists or its kind is unrecognized. See id on GET accounting/invoices/:id and GET accounting/debit-memos/:id."},"targetNumber":{"type":"string","description":"The number of the target document."},"currency":{"type":"string","description":"The currency of this row's appliedAmount. Matches the credit memo currency. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","appliedDate","currency"]},"description":"The application rows, each recording one allocation of the credit memo against an invoice or debit memo. Applying and unapplying both add a row, told apart by actionType and the sign of appliedAmount, so this is an append-only history rather than the current allocation. An empty array when the credit memo has never been applied."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteCreditMemoId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The credit memo's identifiers in other systems, one per configured field name. An empty array or absent when the credit memo has none."}},"additionalProperties":false,"required":["id","creditMemoDate","currency","customerId","entityId","lastModifiedDate"]},"searchAccountingPricingOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header."},"headerNumber":{"type":"string","description":"The pricing header number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The product line this pricing header prices. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of the product line. See name on GET accounting/product-lines/:id."},"productLineNumber":{"type":"string","description":"The product line number. See productLineNumber on GET accounting/product-lines/:id."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"type":"string","description":"The display name of the product. See productName on GET accounting/products/:id."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"dataSource":{"type":"string","description":"The source system or import job that produced the pricing header. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"hasBeenUsed":{"type":"boolean","description":"Whether at least one sales order line uses this pricing header."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the pricing header was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the pricing header last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book entry."},"priceBookEntryNumber":{"type":"string","description":"The price book entry number, assigned by the system."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. On a rate-card entry, the list price is the rate."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Used only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Absent on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"rateCardEntry":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Absent when no price model was set on the rate-card entry."}},"additionalProperties":false,"required":["id","unitOfMeasure"],"description":"The rate-card entry attached to this price book entry. Absent when the entry is not rate-card priced."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the price book entry has none."}},"additionalProperties":false,"required":["id"]},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry. An empty array when the header has none."}},"additionalProperties":false,"required":["id","productLineId","priceBookId","currency","validFrom","lastModifiedDate","priceBookEntries"]},"description":"The pricing headers on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more pricing headers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingPricingInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"term":{"type":"string","description":"Limits results to pricing headers whose price book name, product line name, or header number contains this text. The match is case-insensitive."},"headerNumber":{"type":"string","description":"Limits results to the pricing header with this header number. The match is exact."},"productLineId":{"type":"string","description":"Limits results to pricing headers of this product line. See id on GET accounting/product-lines/:id."},"productId":{"type":"string","description":"Limits results to pricing headers of any product line of this product. See id on GET accounting/products/:id."},"priceBookId":{"type":"string","description":"Limits results to pricing headers in this price book. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"Limits results to pricing headers in this currency. Format ISO 4217, for example 'USD'. The match is exact."},"dataSource":{"type":"string","description":"Limits results to pricing headers from this source system or import job. The match is exact. Example: 'Salesforce'."},"hasBeenUsed":{"type":"boolean","description":"Limits results to pricing headers that at least one sales order line uses (true) or that no sales order line uses (false)."},"validFrom":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound. Use format YYYY-MM-DD."},"end":{"type":"string","description":"The inclusive upper bound. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the first date the header's prices are effective. Bounds are inclusive."},"validTo":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound. Use format YYYY-MM-DD."},"end":{"type":"string","description":"The inclusive upper bound. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the last date the header's prices are effective. Bounds are inclusive. A header with no end date never matches."},"createdDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the pricing header was created. Bounds are inclusive."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the pricing header last changed. Bounds are inclusive."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label. A name that is not configured for price book entries fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier's value in the source system. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to pricing headers with a price book entry that has this external identifier. Send both fieldName and value."}},"additionalProperties":false,"description":"The filters to apply. A pricing header must match every filter you send. Omit to return all pricing headers."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of pricing headers per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"unapplyCreditMemoOutput":{"type":"object","properties":{},"additionalProperties":false},"unapplyCreditMemoInput":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to release the credit from. See id on GET accounting/invoices/:id."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount to reverse, in the credit memo currency. Must be positive. It is stored as a negative row and may not exceed what is currently applied to this invoice."},"appliedDate":{"type":"string","format":"date","description":"The date the reversal is recorded. Use format YYYY-MM-DD. It must fall in an open accounting period."}},"additionalProperties":false,"required":["invoiceId","appliedAmount","appliedDate"]},"description":"The reversals to record. At least one is required. Several rows may target the same invoice, and are summed against what is currently applied to it."}},"additionalProperties":false,"required":["applications"]},"createPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payment."}},"additionalProperties":false,"required":["id"]},"createPaymentInput":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer making the payment. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity receiving the payment. See id on GET base/entities."},"amount":{"type":"string","format":"decimal","description":"The total payment amount, in the payment currency. Must be greater than 0."},"currency":{"type":"string","description":"The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Use format YYYY-MM-DD."},"paymentType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The payment method."},"accountId":{"type":"string","description":"The ledger account to post the payment to. Omit to use the entity's configured electronic payment account, which fails with DEFAULT_ACCOUNT_NOT_CONFIGURED when it is not set. See id on GET accounting/accounts/:id."},"paymentReference":{"type":"string","description":"The reference the payer supplied with the payment, for example a check or wire reference."},"paymentNote":{"type":"string","description":"A free-form note to record on the payment."},"bankFeeAmount":{"type":"string","format":"decimal","description":"The bank fee deducted from the payment, in the payment currency."},"thirdPartyPayerId":{"type":"string","description":"The customer actually making the payment, when a third party pays on the invoiced customer's behalf. See id on GET accounting/customers/:id."}},"additionalProperties":false,"required":["customerId","entityId","amount","currency","paymentDate","paymentType"]},"productsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product."},"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant."},"productNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the product shown to customers."},"internalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product's identifier in an external CRM system."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Format YYYY-MM-DD."},"effectiveEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the product is no longer available. Format YYYY-MM-DD. Absent for a product with no end date."},"productFamily":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product family. Possible values: 'software', 'services', 'physicalProducts'."},"productType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product type. Possible values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"productStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product's availability status, computed by the system. Possible values: 'draft', 'available', 'unavailable', 'incomplete'. It is derived from the product's lines, pricing and effective dates and cannot be set directly."},"isInventory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the product is tracked as inventory."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteSalesOrderOutput":{"type":"object","properties":{},"additionalProperties":false},"accountingPeriodsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this entity-book accounting period row. This identifies the (entity, book, period) combination, not the shared accounting period."},"accountingPeriodId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the underlying accounting period, shared by every entity that uses this fiscal calendar. See id on GET accounting/accounting-periods/:id."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the legal entity this status belongs to. See id on GET base/entities. Absent only when the entity-book link is broken."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this status belongs to."},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the accounting book this status belongs to. A period is opened and closed per book. See id on GET accounting/books/:id."},"bookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the accounting book this status belongs to."},"fiscalCalendarId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the fiscal calendar this period belongs to. See id on GET accounting/fiscal-calendars/:id. Absent when the period was deleted from under its status row."},"fiscalCalendarName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the fiscal calendar this period belongs to."},"periodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the period as its fiscal calendar defines it, for example 'Jan 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"fiscalYear":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal year label this period belongs to, for example 'FY2024'. Set by the calendar, so it need not match the calendar year of startDate."},"fiscalQuarter":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal quarter label this period belongs to, for example 'Q1 2026'."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period, inclusive. Format YYYY-MM-DD. Absent only when the underlying period was deleted."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period, inclusive. Format YYYY-MM-DD."},"status":{"type":"string","description":"The status this entity and book have put the period in. Possible values: 'created' (generated, not yet opened), 'open', 'closed', 'reopened'. Only 'open' and 'reopened' accept postings."},"reopeningReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The free-text reason recorded when the period was reopened. Set only when status is 'reopened'."},"reopenedByCascade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this period was reopened as a side effect of reopening a later one, rather than directly."},"durationDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days the period spans, both bounds inclusive. Absent when startDate or endDate is."},"hasTransactions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether at least one journal entry line has been posted into the underlying period, by any entity."},"postable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the period currently accepts postings for this entity and book, true when its status is 'open' or 'reopened'. This does not account for journal-type-specific locks."},"postableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the period does not accept postings, for example 'status is closed'. Empty when it is postable."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this status row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It changes when the period is opened, closed or reopened for this entity and book."}},"additionalProperties":false},"getTaxConfigurationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax configuration."},"entityId":{"type":"string","description":"The legal entity this configuration belongs to. An entity has at most one tax configuration. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the owning legal entity."},"status":{"type":"string","description":"The status of the tax configuration. The tax codes of an inactive configuration are not offered on documents. Possible values: 'Active', 'Inactive'."},"taxRegime":{"type":"string","description":"The tax system that determines which tax components are valid. Possible values: 'EU_VAT', 'India_GST', 'Canada_GST', 'Ghana_VAT', 'SingleRate_GST', 'Mexico_IVA'."},"externalId":{"type":"string","description":"An external system's identifier for this configuration, set when it was migrated from another system."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the tax configuration record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax code line."},"taxCode":{"type":"string","description":"The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'. Absent when none was supplied."},"title":{"type":"string","description":"The display title of the tax code. Unique within the configuration."},"comment":{"type":"string","description":"A free-form note on when to use this tax code. Absent when none was set."},"vatDeclarationField":{"type":"string","description":"The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Free text, not evaluated. Absent when none was set."},"percentage":{"type":"string","format":"decimal","description":"The tax rate, as a decimal fraction. For example, 0.19 is 19%. 0 for a zero-rated or exempt code."},"rateType":{"type":"string","description":"The legal rate classification of the tax code. Possible values: 'Standard', 'Reduced', 'SuperReduced', 'Zero', 'Exempt'."},"scope":{"type":"string","description":"The territorial scope of the transaction. Possible values: 'Domestic', 'IntraEU_B2B', 'IntraEU_B2C', 'ExtraEU_Goods', 'ExtraEU_Services'."},"direction":{"type":"string","description":"Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales. Possible values: 'Input', 'Output'."},"isReverseCharge":{"type":"boolean","description":"Whether the recipient rather than the supplier accounts for the tax, for example under §13b UStG. A reverse-charge line books a second, crediting entry to reverseChargeCreditAccountId on each of its accounts."},"cashBasis":{"type":"boolean","description":"Cash basis: the tax becomes creditable only when the bill is paid. It posts to the uncollected account and moves to the collected account on payment."},"isActive":{"type":"boolean","description":"Whether the tax code is offered for selection on new documents. Inactive codes stay readable on existing documents."},"index":{"type":"number","description":"The position of the line within its configuration, used for display order."},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account mapping."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount on a reverse-charge line. Absent when isReverseCharge is false. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["id","chartOfAccountsId","accountId"]},"description":"The general ledger accounts this tax code books to, usually one for each chart of accounts the entity books in. Every tax code has at least one, including exempt and zero-rated codes, which book a tax line at zero."},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the component."},"taxComponentCode":{"type":"string"},"percentage":{"type":"string","format":"decimal"},"isRecoverable":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chartOfAccountsId":{"type":"string"},"accountId":{"type":"string"},"reverseChargeCreditAccountId":{"type":"string"},"collectedAccountId":{"type":"string"}},"additionalProperties":false,"required":["id","chartOfAccountsId","accountId"]}}},"additionalProperties":false,"required":["id","taxComponentCode","percentage","isRecoverable","accounts"]},"description":"The tax components of this code, with their GL accounts. Empty for a code that has line-level accounts only."}},"additionalProperties":false,"required":["id","title","percentage","rateType","scope","direction","isReverseCharge","cashBasis","isActive","index","accounts","components"]},"description":"The tax codes of this configuration, in display order. Every configuration has at least one."}},"additionalProperties":false,"required":["id","entityId","status","taxRegime","lastModifiedDate","lines"]},"createTaxConfigurationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created tax configuration."}},"additionalProperties":false,"required":["id"]},"createTaxConfigurationInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity this configuration belongs to. An entity has at most one tax configuration. See id on GET base/entities.","examples":["b6b3a6ce-6c66-4d43-9c8e-6c6c9b8f4a11"]},"status":{"enum":["Active","Inactive"],"description":"The status of the tax configuration. The tax codes of an inactive configuration are not offered on documents.","examples":["Active"]},"taxRegime":{"enum":["EU_VAT","India_GST","Canada_GST","Ghana_VAT","SingleRate_GST","Mexico_IVA"],"description":"The tax system that determines which tax components are valid. Omit to derive it from the entity's country. An unrecognized country derives EU VAT.","examples":["EU_VAT"]},"lines":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":"string","description":"The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'. Supply it when migrating from another system."},"title":{"type":"string","description":"The display title of the tax code. Must be unique within the configuration."},"comment":{"type":"string","description":"A free-form note on when to use this tax code."},"vatDeclarationField":{"type":"string","description":"The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Stored as free text and not evaluated."},"percentage":{"type":"string","format":"decimal","description":"The tax rate, as a decimal fraction. For example, 0.19 is 19%. Send 0 for a zero-rated or exempt code."},"rateType":{"enum":["Standard","Reduced","SuperReduced","Zero","Exempt"],"description":"The legal rate classification of the tax code."},"scope":{"enum":["Domestic","IntraEU_B2B","IntraEU_B2C","ExtraEU_Goods","ExtraEU_Services"],"description":"The territorial scope of the transaction."},"direction":{"enum":["Input","Output"],"description":"Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales."},"isReverseCharge":{"type":"boolean","description":"Whether the recipient rather than the supplier accounts for the tax, for example under §13b UStG. When true, every account on the line must set reverseChargeCreditAccountId."},"cashBasis":{"type":"boolean","description":"Cash basis: the tax becomes creditable only when the bill is paid. It posts to the uncollected account and moves to the collected account on payment. Input tax only. Requires components whose accounts all set collectedAccountId."},"isActive":{"type":"boolean","description":"Whether the tax code is offered for selection on new documents."},"accounts":{"type":"array","items":{"type":"object","properties":{"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount. Required on reverse-charge lines, ignored otherwise. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["chartOfAccountsId","accountId"]},"description":"The general ledger accounts this tax code books to, usually one entry for each chart of accounts the entity books in. Must not be empty, including for exempt and zero-rated codes, which book a tax line at zero."},"components":{"type":"array","items":{"type":"object","properties":{"taxComponentCode":{"type":"string","description":"The tax component code, for example 'VAT'."},"percentage":{"type":"string","format":"decimal","description":"The component's rate as a decimal fraction, for example 0.16 for 16%."},"isRecoverable":{"type":"boolean","description":"Whether the tax can be reclaimed. Every component of a cash-basis code must set true."},"accounts":{"type":"array","items":{"type":"object","properties":{"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. On a cash-basis code this is the uncollected account. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount on a reverse-charge code. See id on GET accounting/accounts/:id."},"collectedAccountId":{"type":"string","description":"Cash basis only. The account the tax moves to once the bill is paid. Required on every account of a cash-basis component, and must differ from accountId. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["chartOfAccountsId","accountId"]},"description":"The GL accounts for this component, one entry per chart of accounts the entity books in. Must not be empty."}},"additionalProperties":false,"required":["taxComponentCode","percentage","isRecoverable","accounts"]},"description":"The tax components of this code, for example a federal and a state part. Required when cashBasis is true. The components' percentages must add up to the line's percentage."}},"additionalProperties":false,"required":["title","percentage","rateType","scope","direction","isReverseCharge","isActive","accounts"]},"description":"The complete set of tax codes for this configuration. Must not be empty. Each line's title, and any taxCode supplied, must be unique within the array.","examples":[[{"title":"Standard rate","taxCode":"V19EUG","percentage":"0.19","rateType":"Standard","scope":"Domestic","direction":"Output","isReverseCharge":false,"isActive":true,"accounts":[{"chartOfAccountsId":"1b9c1f2e-4a6d-4c31-9f5e-2d7a08b6c410","accountId":"7e4d3c21-9b08-4a5f-8c62-1f0e5d9a3b74"}]}]]}},"additionalProperties":false,"required":["entityId","status","lines"]},"createBankEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bank entry.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createBankEntryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the entry is posted under. See id on GET base/entities.","examples":["e8dc29b9-7e79-4709-bb32-95938bcb1bd1"]},"bankAccountId":{"type":"string","description":"The general-ledger account behind the bank account this entry posts against. See id on GET accounting/accounts/:id.","examples":["f50164c3-85e3-4dab-986e-3fdb39f8ecc1"]},"transactionDate":{"type":"string","format":"date","description":"The date the transaction took place. Use format YYYY-MM-DD. It decides the posting period.","examples":["2026-02-14"]},"currency":{"type":"string","description":"The currency of the entry. Format ISO 4217, for example 'USD'. It governs every amount on the entry. Omit to use the account's own currency. When supplied it must match the account's currency.","examples":["USD"]},"status":{"type":"string","description":"The reconciliation status. Accepted values: 'matched', 'unmatched', 'voided', 'integrated'. Defaults to 'unmatched'.","examples":["unmatched"]},"name":{"type":"string","description":"A short name for the entry.","examples":["February bank fees"]},"description":{"type":"string","description":"A free-form description of the entry."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD."},"origin":{"type":"string","description":"The system or process the entry originated from."},"externalUrl":{"type":"string","description":"A link to the entry in the originating system."},"lines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage is supplied. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Required, because the schedule lines are created from it when the entry's journal entry is posted."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. Only a prepaid line may carry them: on any other line they are refused with AMORTIZATION_NOT_ALLOWED_ON_LINE. Because lineType is derived from the account's sub-type when omitted, a line that resolves to a non-prepaid account is refused the same way."}},"additionalProperties":false,"required":["accountId","amount"]},"description":"The lines of the entry, in the order they appear. At least one is required. No line may be zero, and the lines may not sum to zero.","examples":[[{"accountId":"9994c3ed-f812-44c1-9454-7f36b2bfb0fb","amount":"-125.00","description":"Account maintenance fee","lineType":"oneTime"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the entry, each naming an already-uploaded file by its id. Required on a tenant configured to require an attachment."}},"additionalProperties":false,"required":["entityId","bankAccountId","transactionDate","lines"]},"updateDebitMemoOutput":{"type":"object","properties":{},"additionalProperties":false},"updateDebitMemoInput":{"type":"object","properties":{"customerMessage":{"type":"string","description":"A new free-text message to show the customer on the document. Pass an empty string to clear it.","examples":["Revised: covers the re-debited licence fee only."]},"purchaseOrder":{"type":"string","description":"A new purchase-order reference from the customer. Pass an empty string to clear it.","examples":["PO-88214"]},"paymentTerm":{"type":"string","description":"A new payment-term key to record on the document. This does not recompute dueDate. See code on GET accounting/payment-terms."}},"additionalProperties":false},"createDebitMemoOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created debit memo.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"debitMemoNumber":{"type":"string","description":"The debit memo number, for example 'DM-1'. Absent while none has been assigned.","examples":["DM-1042"]},"creditMemoId":{"type":"string","description":"The source credit memo this debit memo settles. See id on GET accounting/credit-memos/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"creditMemoNumber":{"type":"string","description":"The number of the source credit memo. Present whenever creditMemoId is."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo was issued. Format YYYY-MM-DD.","examples":["2026-08-01"]},"dueDate":{"type":"string","format":"date","description":"The date the debit memo falls due. Format YYYY-MM-DD. As supplied, or computed from debitMemoDate plus the payment term's days.","examples":["2026-08-31"]},"taxDate":{"type":"string","format":"date","description":"The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate."},"approvalStatus":{"type":"string","description":"The approval status of the new debit memo. Possible values: 'approved', 'draft'. It's 'approved' unless debit memos in your tenant go through approval.","examples":["approved"]},"debitMemoStatus":{"type":"string","description":"The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'disputed'. Absent before approval."},"debitMemoType":{"type":"string","description":"The reason key for the charge, as supplied or inherited from the source credit memo, for example 'orderEntryError'.","examples":["orderEntryError"]},"currency":{"type":"string","description":"The currency of the debit memo, taken from the source credit memo. Format ISO 4217, for example 'USD'. It governs every amount on the record.","examples":["USD"]},"customerId":{"type":"string","description":"The customer the debit memo is issued to, taken from the source credit memo. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"customerName":{"type":"string","description":"The display name of the customer."},"customerNumber":{"type":"string","description":"The customer number."},"entityId":{"type":"string","description":"The legal entity that issued the debit memo, taken from the source credit memo. See id on GET base/entities.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"paymentTerm":{"type":"string","description":"The payment-term key applied to the debit memo. See code on GET accounting/payment-terms.","examples":["net30"]},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"customerMessage":{"type":"string","description":"A free-text message shown to the customer on the document."},"externalDebitMemoId":{"type":"string","description":"The identifier of this debit memo in an external source system."},"isMigrated":{"type":"boolean","description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed."},"debitGlAccountId":{"type":"string","description":"The general ledger account the journal entry debits for the debit memo's full amount. Absent when you didn't send one. The journal entry then uses the entity's customer receivables account. See id on GET accounting/accounts/:id."},"billToAddressId":{"type":"string","description":"The bill-to address on the document. There is no endpoint for it.","examples":["9f3e6d81-b7d0-4aec-8c3f-2e8f70b13a45"]},"soldToAddressId":{"type":"string","description":"The sold-to address on the document. There is no endpoint for it.","examples":["b7d0aec3-9f3e-4d81-8c3f-6d81b7d0aec3"]},"subtotal":{"type":"string","format":"decimal","description":"The sum of the lines' pre-discount totals, in the debit memo currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total including tax, in the debit memo currency.","examples":["500.00"]},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the debit memo currency."},"totalAmountDebited":{"type":"string","format":"decimal","description":"The gross amount debited, in the debit memo currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of the prorated discount amounts across all lines, in the debit memo currency."},"unappliedCreditAmount":{"type":"string","format":"decimal","description":"The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T09:12:44.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo line."},"lineNumber":{"type":"string","description":"The sequential line number within the debit memo."},"description":{"type":"string","description":"A free-text line description, shown to the customer."},"productId":{"type":"string","description":"The debited product. Absent on a free-text line. See id on GET accounting/products/:id."},"creditMemoLineId":{"type":"string","description":"The source credit memo line this line debits. See lines[].id on GET accounting/credit-memos/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit as it stood on the source credit memo line, in the debit memo currency."},"listPriceTotal":{"type":"string","format":"decimal","description":"The pre-discount line total, in the debit memo currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount from the source credit memo line, in the debit memo currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount as a percentage of the list price. A percentage, not an amount, so it has no currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency."},"amountDebited":{"type":"string","format":"decimal","description":"The amount debited for the line, in the debit memo currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount of the source credit memo line still available to debit, in the debit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"taxMode":{"type":"string","description":"How the line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code applied to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. See id on GET accounting/accounts/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the created debit memo, each with its assigned id and line number."}},"additionalProperties":false,"required":["id","debitMemoDate","debitMemoType","currency","customerId","entityId","paymentTerm","billToAddressId","soldToAddressId","lastModifiedDate"]},"createDebitMemoInput":{"type":"object","properties":{"creditMemoId":{"type":"string","description":"The source credit memo this debit memo settles. Required: a standalone debit memo cannot be created over this API. The customer, legal entity and currency come from this credit memo, not the request. See id on GET accounting/credit-memos/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo is issued. Use format YYYY-MM-DD. Must fall in an open accounting period unless isMigrated is true.","examples":["2026-08-01"]},"paymentTerm":{"type":"string","description":"The payment-term key to apply. When dueDate is omitted, it is computed from debitMemoDate plus this term's days. See code on GET accounting/payment-terms.","examples":["net30"]},"debitMemoType":{"type":"string","description":"The reason key for the charge, for example 'orderEntryError'. Omit to inherit the source credit memo's reason key. When neither supplies one the call fails with MISSING_REQUIRED_FIELD. The accepted keys are configured per tenant.","examples":["orderEntryError"]},"dueDate":{"type":"string","format":"date","description":"The date the debit memo falls due. Use format YYYY-MM-DD. Omit to compute it from debitMemoDate plus the payment term's days."},"taxDate":{"type":"string","format":"date","description":"The date to determine tax on. Use format YYYY-MM-DD. Omit to use debitMemoDate."},"billToAddressId":{"type":"string","description":"The bill-to address for the document. Omit to inherit the source credit memo's. When neither supplies one the call fails with MISSING_REQUIRED_FIELD. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address for the document. Omit to inherit the source credit memo's. When neither supplies one the call fails with MISSING_REQUIRED_FIELD. There is no endpoint for it."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference to record on the document.","examples":["PO-88213"]},"customerMessage":{"type":"string","description":"A free-text message to show the customer on the document."},"debitGlAccountId":{"type":"string","description":"The general ledger account the journal entry debits for the debit memo's full amount. Omit to use the entity's customer receivables account. See id on GET accounting/accounts/:id."},"isMigrated":{"type":"boolean","description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning, its journal entries are auto-reversed, and the open-accounting-period check on debitMemoDate is skipped. Defaults to false."},"lines":{"type":"array","items":{"type":"object","properties":{"creditMemoLineId":{"type":"string","description":"The source credit memo line this line debits. Must be a line of the credit memo named by creditMemoId, or the request fails with CREDIT_MEMO_LINE_NOT_FOUND. The debit memo line inherits its tax-exclusion state from that source line. See lines[].id on GET accounting/credit-memos/:id."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the source credit memo's currency. Must be greater than 0."},"description":{"type":"string","description":"A free-text line description, shown to the customer."},"productId":{"type":"string","description":"The product the line refers to. Omit on a free-text line. See id on GET accounting/products/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'. An unrecognized value fails with INVALID_ENUM_VALUE."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the source credit memo's currency."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the source credit memo's currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the source credit memo's currency. Omit to have the tax engine determine it."},"taxCode":{"type":"string","description":"The tax code to apply to the line."},"taxDate":{"type":"string","format":"date","description":"The date to determine the line's tax on. Use format YYYY-MM-DD."},"taxMode":{"enum":["taxInclusive","taxExclusive"],"description":"How the line's prices are quoted for tax."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code to apply to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. See id on GET accounting/accounts/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Use format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["creditMemoLineId","totalPrice"]},"description":"The lines of the debit memo. At least one is required, or the request fails with NO_LINES. Every amount is in the source credit memo's currency.","examples":[[{"creditMemoLineId":"7d34c8e9-b21f-4a5c-9f3e-6d81b7d0aec3","description":"Re-debit of over-credited licence fee","quantity":"2","unitOfMeasure":"license","unitPrice":"250.00","totalPrice":"500.00"}]]}},"additionalProperties":false,"required":["creditMemoId","debitMemoDate","paymentTerm","lines"]},"addAccountingProductLinesOutput":{"type":"object","properties":{"createdProductLineIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the created product lines, in the same order as productLines. The 'usage' lines created alongside 'prepaid' or threshold-based lines are not included."}},"additionalProperties":false,"required":["createdProductLineIds"]},"addAccountingProductLinesInput":{"type":"object","properties":{"productLines":{"type":"array","items":{"type":"object","properties":{"lineType":{"type":"string","description":"The type of product line. Accepted values: 'recurring', 'oneTime', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'. 'usage' is not accepted and fails with UNSUPPORTED_LINE_TYPE, because 'usage' lines are only created automatically with their parent line. 'commitWithOverage' is not supported and fails with VALIDATION_FAILED."},"priceModel":{"type":"string","description":"How the product line is priced. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"name":{"type":"string","description":"A name for the product line. Omit to have one generated."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Accepted values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Accepted values: 'allowNegative', 'overage'. 'allowNegative' lets the balance go negative and takes the shortfall from the new prepaid amount at renewal. 'overage' stops the balance at 0 and invoices further usage at the line's overage rate. Defaults to 'allowNegative' on a 'prepaid' line."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal. Defaults to true on a 'prepaid' line."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."},"engine":{"type":"string","description":"The tax engine that computes this tax. Accepted values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."}},"additionalProperties":false,"required":["taxCode","entityId","engine"]},"description":"The tax records to attach to the product line. Provide only when a tax provider is configured."},"priceBookHeadersToCreate":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. Required when the product line is priced 'flat' or 'perUnit'."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Omit on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["unitOfMeasure"],"description":"The rate-card entry to attach. Provide only on rate-card-priced entries."}},"additionalProperties":false},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","priceBookEntries"]},"description":"The pricing headers to create for the product line."},"priceBookHeadersForUsage":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this rate-card entry, in the header currency."}},"additionalProperties":false,"required":["usageType","unitOfMeasure"]},"description":"The rate-card entries on the header. Pricing of a 'usage' line is always rate-card based."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","rateCardEntries"]},"description":"The pricing for the paired 'usage' line that the API creates. Provide only when lineType is 'prepaid', or when lineType is 'recurring' and priceModel is 'thresholdBased'. On any other line the request fails with USAGE_PRICING_NOT_APPLICABLE."}},"additionalProperties":false,"required":["lineType","priceModel","unitOfMeasure"]},"description":"The product lines to create, each with optional pricing. A 'prepaid' line, or a 'recurring' line whose priceModel is 'thresholdBased', also creates a paired 'usage' line. Provide the pricing of the paired 'usage' line in priceBookHeadersForUsage."}},"additionalProperties":false,"required":["productLines"]},"getAccountingPricingOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header."},"headerNumber":{"type":"string","description":"The pricing header number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The product line this pricing header prices. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of the product line. See name on GET accounting/product-lines/:id."},"productLineNumber":{"type":"string","description":"The product line number. See productLineNumber on GET accounting/product-lines/:id."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"type":"string","description":"The display name of the product. See productName on GET accounting/products/:id."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"dataSource":{"type":"string","description":"The source system or import job that produced the pricing header. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"hasBeenUsed":{"type":"boolean","description":"Whether at least one sales order line uses this pricing header."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the pricing header was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the pricing header last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book entry."},"priceBookEntryNumber":{"type":"string","description":"The price book entry number, assigned by the system."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. On a rate-card entry, the list price is the rate."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Used only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Absent on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"rateCardEntry":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Absent when no price model was set on the rate-card entry."}},"additionalProperties":false,"required":["id","unitOfMeasure"],"description":"The rate-card entry attached to this price book entry. Absent when the entry is not rate-card priced."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the price book entry has none."}},"additionalProperties":false,"required":["id"]},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry. An empty array when the header has none."}},"additionalProperties":false,"required":["id","productLineId","priceBookId","currency","validFrom","lastModifiedDate","priceBookEntries"]},"getAccountingSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"salesReturnNumber":{"type":"string","description":"The RMA number, for example 'SR-1'. Absent while none has been assigned."},"status":{"type":"string","description":"The lifecycle status of the sales return. Possible values: 'draft', 'submitted', 'received', 'approved', 'completed', 'cancelled', 'rejected'."},"returnType":{"type":"string","description":"The resolution path for the return. Possible values: 'credit', 'replacement'. It cannot be changed once status moves past 'draft'."},"returnDate":{"type":"string","description":"The transaction date for the return. Format YYYY-MM-DD."},"salesOrderId":{"type":"string","description":"The sales order this return is against. A sales return is always against exactly one sales order. See id on GET accounting/sales-orders/:id."},"currency":{"type":"string","description":"The currency of every amount on this record and its lines. Format ISO 4217, for example 'USD'."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return. Possible values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'. It is for reporting and does not affect how the return is resolved."},"notes":{"type":"string","description":"Free-form notes for the return."},"returnTrackingNumber":{"type":"string","description":"The carrier tracking number for the inbound return shipment."},"totalReturnAmount":{"type":"string","format":"decimal","description":"The total return amount, the sum of every line's totalPrice, in the return currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund, such as a restocking fee, in the return currency. Credit returns only. It is set either here or on the lines, never both."},"shippingRefundAmount":{"type":"string","format":"decimal","description":"The shipping charge refunded to the customer, in the return currency. Credit returns only."},"totalRevenueImpact":{"type":"string","format":"decimal","description":"The revenue reversed to the customer, the product-line revenue impact plus the shipping refund, in the return currency. Always 0 for the replacement path."},"revenueStatus":{"type":"string","description":"The revenue reversal status. Possible values: 'notApplicable', 'notStarted', 'reversed'. 'notApplicable' is the replacement path, and 'reversed' is a completed credit return."},"inventoryReturnNumber":{"type":"string","description":"The document number of the linked inventory sales return. Absent until one has been created."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales return last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this return line."},"salesOrderProductLineId":{"type":"string","description":"The sales order product line this line returns. See salesOrderProductLineId on GET accounting/sales-orders/:id."},"lineType":{"type":"string","description":"The product line type, copied from the sales order line at creation."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned."},"unitOfMeasure":{"type":"string","description":"The unit of measure, copied from the sales order line."},"currency":{"type":"string","description":"The currency of unitPrice, totalPrice and returnFeeAmount on this line, copied from the sales return. Format ISO 4217, for example 'USD'."},"unitPrice":{"type":"string","format":"decimal","description":"The unit price, copied from the sales order line at creation, in this line's currency."},"totalPrice":{"type":"string","format":"decimal","description":"The total price for the line, quantity times unitPrice, in this line's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund for this line, in this line's currency. Credit returns only. Set only when fees are tracked per line rather than on the header."},"revenueImpactAmount":{"type":"string","format":"decimal","description":"The revenue reversed for this line, in this line's currency. 0 for the replacement path."},"lineStatus":{"type":"string","description":"The lifecycle status of this line. Possible values: 'pending', 'received', 'approved', 'completed', 'cancelled', 'rejected'."}},"additionalProperties":false,"required":["id","salesOrderProductLineId","lineType","quantity","unitOfMeasure","currency","unitPrice","lineStatus"]},"description":"The product lines being returned."}},"additionalProperties":false,"required":["id","status","returnType","returnDate","salesOrderId","currency","lastModifiedDate","lines"]},"createPriceBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created price book."}},"additionalProperties":false,"required":["id"]},"createPriceBookInput":{"type":"object","properties":{"priceBookName":{"type":"string","description":"The display name of the price book. Required, and must be unique within the tenant, compared case-insensitively."},"active":{"type":"boolean","description":"Whether the price book is active and usable in transactions. Omit to use the default."},"description":{"type":"string","description":"A free-form description of the price book."},"dataSource":{"type":"string","description":"The source system that provided the price book data."}},"additionalProperties":false,"required":["priceBookName"]},"accountingPeriodStatusesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this entity-book period status row. This identifies the (entity, book, period) combination, not the shared accounting period."},"accountingPeriodId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the underlying accounting period, shared by every entity that uses this fiscal calendar. See id on GET accounting/accounting-periods/:id."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the legal entity this status belongs to. See id on GET base/entities. Absent only when the entity-book link is broken."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this status belongs to."},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the accounting book this status belongs to. A period is opened and closed per book. See id on GET accounting/books/:id."},"bookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the accounting book this status belongs to."},"periodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the period as its fiscal calendar defines it, for example 'Jan 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"fiscalYear":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal year label this period belongs to, for example 'FY2024'. Set by the calendar, so it need not match the calendar year of startDate."},"fiscalQuarter":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal quarter label this period belongs to, for example 'Q1 2026'."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period, inclusive. Format YYYY-MM-DD. Absent only when the underlying period was deleted."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period, inclusive. Format YYYY-MM-DD."},"status":{"type":"string","description":"The status this entity and book have put the period in. Possible values: 'created' (generated, not yet opened), 'open', 'closed', 'reopened'. Only 'open' and 'reopened' accept postings."},"reopeningReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The free-text reason recorded when the period was reopened. Set only when status is 'reopened'."},"reopenedByCascade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this period was reopened as a side effect of reopening a later one, rather than directly."},"postable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the period currently accepts postings for this entity and book, true when its status is 'open' or 'reopened'. This does not account for journal-type-specific locks."},"postableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the period does not accept postings, for example 'status is closed'. Empty when it is postable."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this status row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It changes when the period is opened, closed or reopened for this entity and book."}},"additionalProperties":false},"updateCustomerOutput":{"type":"object","properties":{},"additionalProperties":false},"updateCustomerInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The id of the legal entity to move the customer to. Documents created afterward use this legal entity, and existing ones keep theirs."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"customerType":{"type":"string","description":"The customer type. Accepted values: 'default', 'partner'. Cannot be changed once the customer appears on a sales order. That change fails with CUSTOMER_TYPE_CHANGE_NOT_ALLOWED. 'endCustomer' is not supported and fails with END_CUSTOMER_NOT_SUPPORTED."},"partnerType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The partner type, for a customer whose customerType is 'partner'. Accepted values: 'reseller', 'thirdPartyPayer'."},"businessType":{"type":"string","description":"The business type of the customer. Accepted values: 'company', 'individual'."},"invoiceEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address invoices are sent to.","examples":["ap@example-robotics.com"]},"mainEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address of the customer's main contact."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax. Setting it to false also clears exemptionNumber and taxExemptCode."},"defaultCurrency":{"type":"string","description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code."},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The market segment of the customer. Accepted values: 'SMB', 'MidMarket', 'Enterprise'. Ignored when businessType is 'individual', in this request or already set.","examples":["MidMarket"]},"exemptionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax-exemption certificate number. Accepted only when taxExempt is true, in this request or already set. Otherwise the request fails with EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT."},"paymentTermCode":{"type":"string","description":"The code of a payment term on the customer's legal entity's list. When the request also changes entityId, the code must be on the new legal entity's list. A code that is not on the list fails with UNKNOWN_REFERENCE. See code on GET accounting/payment-terms."},"parentId":{"type":"string","description":"The id of the parent customer. An unknown id fails with UNKNOWN_REFERENCE."},"partnerId":{"type":"string","description":"The id of the partner this customer buys through. An unknown id fails with UNKNOWN_REFERENCE."},"salesChannel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales channel for this customer. Accepted values: 'salesAssisted' (sold through a salesperson), 'selfServe'."},"additionalContactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Another email address for the customer, besides invoiceEmail and mainEmail."},"mainContactName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer's main contact."},"preferredLanguage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's preferred language. Accepted values: 'english'."},"crmCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's identifier in an external CRM system."},"businessIdentificationNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's business registration number."},"invoiceConsolidation":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the customer's invoices are consolidated. Accepted values: 'customer', 'purchaseOrderNumber', 'salesArrangement'."},"invoiceDeliveryMode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How invoices are delivered to the customer. Accepted values: 'manual', 'automated'."},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether the customer is exempt from credit-card fees."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel and expense items appear on invoices. Accepted values: 'detailed', 'consolidated'."},"status":{"type":"string","description":"The status of the customer. Accepted values: 'active', 'inactive'."},"taxExemptCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax-exemption reason code. Cleared when taxExempt is false."},"taxRegistrations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"The country the registration applies in, as an ISO 3166-1 code."},"taxNumber":{"type":"string","description":"The tax identification number issued by the tax authority."},"type":{"type":"string","description":"The kind of tax registration. Accepted values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'."},"effectiveDate":{"type":"string","format":"date","description":"The date the registration takes effect. Use format YYYY-MM-DD."},"isActive":{"type":"boolean","description":"Whether the registration is active. Only one active registration is allowed per country and tax type. Defaults to true."}},"additionalProperties":false,"required":["country","taxNumber","type"]},"description":"The customer's tax registrations. This array replaces the customer's whole set of registrations. An entry matching an existing registration on country and type updates it. Any other entry is added. A registration not in the array is deleted. Send an empty array to remove them all."},"payment":{"type":"object","properties":{"provider":{"type":"string","description":"The name of a payment provider connected to your tenant. An unknown name fails with UNKNOWN_PAYMENT_PROVIDER, which lists the connected providers. Required when any other payment field is sent. Example: 'Stripe'."},"externalCustomerId":{"type":"string","description":"The customer's identifier in the payment provider's system."},"externalPaymentMethodId":{"type":"string","description":"The customer's default payment method in the payment provider's system."}},"additionalProperties":false,"description":"The customer's link to a payment provider. `externalPaymentMethodId` requires `externalCustomerId`, in this request or already set."},"addresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Accepted values: 'billTo', 'soldTo'."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"isDefault":{"type":"boolean","description":"Whether this entry is the default address of its type."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","line1","city","country","zipCode"]},"description":"The customer's addresses. This array replaces the customer's whole address set, both types, and every address gets a new addressId. Send an empty array to remove every address."},"createAddresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Accepted values: 'billTo', 'soldTo'."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"isDefault":{"type":"boolean","description":"Whether this entry is the default address of its type."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","line1","city","country","zipCode"]},"description":"Addresses to add to the customer, alongside its existing ones. Mark at most one entry per type as the default with isDefault. Cannot be combined with `addresses`. That combination fails with INVALID_FIELD_VALUE."},"updateAddresses":{"type":"array","items":{"type":"object","properties":{"addressId":{"type":"string","description":"The address to update. See addressId on GET accounting/customers/:id."},"type":{"type":"string","description":"The address type. Accepted values: 'billTo', 'soldTo'. A different value moves the address to that type."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"isDefault":{"type":"boolean","description":"Whether this entry is the default address of its type."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["addressId"]},"description":"Changes to existing addresses of the customer, each named by its addressId. A field you omit keeps its current value. Each address keeps its addressId. An addressId the customer does not have fails with ADDRESS_NOT_FOUND. Cannot be combined with `addresses`. That combination fails with INVALID_FIELD_VALUE."},"deleteAddresses":{"type":"array","items":{"type":"string"},"description":"The addressIds of the addresses to remove from the customer. An addressId the customer does not have fails with ADDRESS_NOT_FOUND. When you remove the default address of a type, another address of that type becomes the default. Cannot be combined with `addresses`. That combination fails with INVALID_FIELD_VALUE. See addressId on GET accounting/customers/:id."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. A fieldName the customer already has fails with DUPLICATE_EXTERNAL_IDENTIFIER."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to replace, matched by fieldName. A fieldName the customer does not have fails with EXTERNAL_IDENTIFIER_NOT_FOUND."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove. A fieldName the customer does not have fails with EXTERNAL_IDENTIFIER_NOT_FOUND."}},"additionalProperties":false},"executeAccountingPeriodTaskOutput":{"type":"object","properties":{},"additionalProperties":false},"executeAccountingPeriodTaskInput":{"type":"object","properties":{"task":{"type":"string","description":"The close task to run. Possible values: 'open', 'close', 'reopen', 'lockAR', 'unlockAR', 'lockAP', 'unlockAP', 'lockJournals', 'unlockJournals', 'lockRevenue', 'unlockRevenue', 'runRevaluation', 'calculateConsolidationRates'. These are the taskCode values on closeTasks. An unrecognized code fails with UNKNOWN_TASK. A recognized code that cannot run now fails with TASK_NOT_EXECUTABLE."},"reopeningReason":{"type":"string","description":"A free-text reason recorded against the period. Used only by the 'reopen' task, which stores it as the period's reopeningReason and shows it on both read routes. Other tasks ignore it. Supply it when reopening a closed period, since it is the only record of why the close was undone."}},"additionalProperties":false,"required":["task"]},"searchCreditMemoOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo."},"creditMemoNumber":{"type":"string","description":"The credit memo number, for example 'CM-1'. Absent while none has been assigned."},"creditMemoDate":{"type":"string","format":"date","description":"The date the credit memo was issued. Format YYYY-MM-DD."},"creditMemoStatus":{"type":"string","description":"The application status of the credit memo. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'."},"creditMemoType":{"type":"string","description":"How the credit memo was created. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn'. Only 'manual' credit memos are created through this API. The rest come from internal workflows."},"manualCreditMemoType":{"type":"string","description":"The reason for a manual credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Absent when creditMemoType is not 'manual'."},"currency":{"type":"string","description":"The currency of the credit memo. Every amount on the record, its lines and its application rows is in this currency. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"A free-form description of the credit memo."},"externalCreditMemoId":{"type":"string","description":"The identifier of this credit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"customerId":{"type":"string","description":"The customer the credit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer the credit memo is issued to."},"customerNumber":{"type":"string","description":"The customer number of the customer the credit memo is issued to."},"entityId":{"type":"string","description":"The legal entity that issued the credit memo. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that issued the credit memo."},"invoiceId":{"type":"string","description":"The invoice the credit memo was created from. Absent when it was not created from an invoice. See id on GET accounting/invoices/:id."},"invoiceNumber":{"type":"string","description":"The number of the invoice the credit memo was created from. Present whenever invoiceId is."},"subtotal":{"type":"string","format":"decimal","description":"The subtotal before tax and duties, in the credit memo currency. Absent when no subtotal has been computed."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the credit memo currency."},"totalDutiesAndCustoms":{"type":"string","format":"decimal","description":"The total duties and customs across all lines, in the credit memo currency."},"totalAmountCredited":{"type":"string","format":"decimal","description":"The total credited, including tax and duties, in the credit memo currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount applied to invoices and debit memos so far, in the credit memo currency. This is the net of the application rows below."},"unappliedAmount":{"type":"string","format":"decimal","description":"The amount still available to apply, in the credit memo currency."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the credit memo last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo line."},"creditMemoLineNumber":{"type":"string","description":"The line number within the credit memo."},"description":{"type":"string","description":"The line description, as shown to the customer."},"productId":{"type":"string","description":"The product credited by the line. Absent on free-text lines. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The product code as it stood when the line was created. It does not follow later changes to the product."},"productDescription":{"type":"string","description":"The product description as it stood when the line was created. It does not follow later changes to the product."},"quantity":{"type":"string","format":"decimal","description":"The quantity credited."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the credit memo currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total before tax and duties, in the credit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the credit memo currency."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs on the line, in the credit memo currency."},"amountCredited":{"type":"string","format":"decimal","description":"The total credited for the line, in the credit memo currency: totalPrice + taxAmount + dutiesAndCustomsAmount."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the credit memo, each crediting one product or free-text item. An empty array when the credit memo has no lines. Every amount is in the credit memo currency."},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the application row."},"appliedAmount":{"type":"string","format":"decimal","description":"The signed amount moved by this row, in the row's currency: positive when applying, negative when unapplying. Sum the rows to reconcile against the header appliedAmount."},"appliedDate":{"type":"string","format":"date","description":"The date the allocation was recorded. Format YYYY-MM-DD."},"actionType":{"type":"string","description":"What this row did. Possible values: 'applied', 'unapplied'."},"type":{"type":"string","description":"The kind of document the credit memo was allocated against. Possible values: 'invoice', 'debitMemo'. Absent when the stored target kind is not one this version recognizes."},"targetId":{"type":"string","description":"The target document: an invoice when type is 'invoice', a debit memo when type is 'debitMemo'. Absent when the target no longer exists or its kind is unrecognized. See id on GET accounting/invoices/:id and GET accounting/debit-memos/:id."},"targetNumber":{"type":"string","description":"The number of the target document."},"currency":{"type":"string","description":"The currency of this row's appliedAmount. Matches the credit memo currency. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","appliedDate","currency"]},"description":"The application rows, each recording one allocation of the credit memo against an invoice or debit memo. Applying and unapplying both add a row, told apart by actionType and the sign of appliedAmount, so this is an append-only history rather than the current allocation. An empty array when the credit memo has never been applied."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteCreditMemoId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The credit memo's identifiers in other systems, one per configured field name. An empty array or absent when the credit memo has none."}},"additionalProperties":false,"required":["id","creditMemoDate","currency","customerId","entityId","lastModifiedDate"]},"description":"The matching credit memos for this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchCreditMemoInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the credit memo with this id."},"creditMemoNumber":{"type":"string","description":"Limits results to the credit memo with this number, for example 'CM-1'. The match is exact."},"customerId":{"type":"string","description":"Limits results to credit memos issued to this customer. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"Limits results to credit memos whose customer name contains this text. The match is case-insensitive."},"customerNumber":{"type":"string","description":"Limits results to credit memos with this customer number. The match is exact."},"entityId":{"type":"string","description":"Limits results to credit memos issued by this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to credit memos whose entity name contains this text. The match is case-insensitive."},"creditMemoStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to credit memos in any of these application statuses. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'. Any other value matches no credit memo. An empty array does not constrain."},"creditMemoType":{"type":"array","items":{"type":"string"},"description":"Limits results to credit memos of any of these types. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn'. Any other value matches no credit memo. An empty array does not constrain."},"description":{"type":"string","description":"Limits results to credit memos whose description contains this text. The match is case-insensitive."},"externalCreditMemoId":{"type":"string","description":"Limits results to the credit memo with this external source system identifier. The match is exact."},"invoiceNumber":{"type":"string","description":"Limits results to credit memos created from the invoice with this number. The match is exact."},"creditMemoDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to credit memos issued between the given bounds. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the credit memo last changed, the window to poll for an incremental sync. Omit either bound to leave that side open."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteCreditMemoId'. It must be the fieldName of an existing credit-memo external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier value to match, exactly as the other system stores it."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to credit memos with this external identifier. Both fieldName and value are required. Several credit memos may share a value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. A credit memo must match every filter you send. Omit to return all credit memos."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of credit memos per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit on the first request."}},"additionalProperties":false},"invoiceRunsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice run.","examples":["1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15"]},"invoiceRunNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice run number, for example 'ISR-1042'.","examples":["ISR-1042"]},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The execution status of the run, as stored rather than corrected, so a run whose worker was killed or lost reads 'running' without end. GET accounting/invoice-runs/:id reports 'error' for such a run instead. Possible values: 'created', 'running', 'completed', 'error', 'completeAndError'.","examples":["completed"]},"invoicesCreated":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of invoices the run created.","examples":[3]},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What started the run. Possible values: 'immediately', 'daily', 'monthly'.","examples":["immediately"]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The line types billed, as the raw stored text: the billed line types joined by semicolons into one string, such as 'all'. GET accounting/invoice-runs/:id publishes this as an array instead.","examples":["all"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity billed. See id on GET base/entities.","examples":["6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53"]},"salesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order billed. Absent on a customer- or entity-scoped run. See id on GET accounting/sales-orders/:id.","examples":["8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39"]},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the run was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-09-30T08:14:22.000Z"]},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the run finished, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent while the run is still working, and on a run whose worker stopped without recording one.","examples":["2026-09-30T08:14:41.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the invoice run record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-09-30T08:14:41.000Z"]}},"additionalProperties":false},"updateAccountingProductOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingProductInput":{"type":"object","properties":{"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant. A code another product already uses fails with DUPLICATE_PRODUCT_CODE."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Use format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The date the product is no longer available. Use format YYYY-MM-DD."},"productFamily":{"type":"string","description":"The product family. Accepted values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"The product type. Accepted values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"description":{"type":"string","description":"A description of the product shown to customers."},"internalDescription":{"type":"string","description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"type":"string","description":"The product's identifier in an external CRM system."},"isInventory":{"type":"boolean","description":"Whether the product is tracked as inventory."},"itemIds":{"type":"array","items":{"type":"string"},"description":"The full set of inventory items linked to the product. This array replaces the whole set. Pass every item that should stay linked, and send an empty array to unlink every item. See id on GET inventory/items/:id."}},"additionalProperties":false},"bankEntriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank entry."},"bankEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank entry number. Absent until one has been assigned."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the bank entry."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the entry."},"transactionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services were delivered. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reconciliation status of the entry. Possible values: 'matched', 'unmatched', 'voided', 'integrated'."},"journalEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A label for the source system the entry was created from."},"bankAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the bank general-ledger account."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bank entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"performanceObligationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the performance obligation."},"performanceObligationNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The performance obligation number. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the performance obligation, as it appears on revenue contracts and schedules."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of what the obligation covers. Absent when none is set."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this obligation is in effect. Format YYYY-MM-DD."},"effectiveEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last date this obligation is in effect. Format YYYY-MM-DD. Absent when the obligation is open-ended."},"allocationStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date from which revenue for this obligation takes part in allocation. Format YYYY-MM-DD. Absent when none is set."},"isAllocationExcluded":{"type":"boolean","description":"Whether the revenue contract lines of this obligation are left out of fair-value allocation."},"isNetAccounting":{"type":"boolean","description":"Whether the obligation is accounted net rather than gross."},"defaultAmortizationMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The default amortization method used when scheduling this obligation's revenue. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"standaloneSellingPriceRangeType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the obligation's standalone selling price ranges are expressed. Possible values: 'percentage', 'amount'."},"revenueSchedulingTemplateName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the revenue scheduling template that schedules this obligation's revenue."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the performance obligation last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"cancelSubscriptionOutput":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"Id of the canceled subscription (a UUID); echoes the :id path segment."},"status":{"type":"string","description":"Status of the subscription after the call. Always 'cancelled'."},"cancellationDate":{"type":"string","format":"date","description":"Effective date the service ends (ISO 8601, YYYY-MM-DD); echoes the validated cancellationDate."}},"additionalProperties":false,"required":["subscriptionId","status","cancellationDate"]},"cancelSubscriptionInput":{"type":"object","properties":{"cancellationDate":{"type":"string","format":"date","description":"Date the service ends (ISO 8601, YYYY-MM-DD). For evergreen subscriptions this must fall on a billing-period boundary and on/after the end of the last invoiced period."},"submissionDate":{"type":"string","format":"date","description":"Date the customer requested the cancellation (ISO 8601, YYYY-MM-DD). Recorded on the cancellation for audit."},"reasonCode":{"enum":["noReasonGiven","budgetary","movingToCompetitors","lowCustomerSatisfaction","bankruptcy","acquisitionMerger"],"description":"Reason for the cancellation. Defaults to noReasonGiven."},"note":{"type":"string","description":"Free-text note recorded on the cancellation"},"invoiceImmediately":{"type":"boolean","description":"Evergreen subscriptions only: immediately invoice the final prorated period up to the cancellation date. Defaults to false."},"externalOrderId":{"type":"string","description":"Upstream order reference, recorded on the cancellation note for audit. Cancellation is naturally idempotent: a repeat call returns ALREADY_CANCELLED."}},"additionalProperties":false,"required":["cancellationDate"]},"getRevenueContractOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract."},"revenueContractNumber":{"type":"string","description":"The revenue contract number, unique within the tenant."},"approvalStatus":{"type":"string","description":"The approval status of the contract. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"generalStatus":{"type":"string","description":"The overall status of the contract, combining approval and any active revenue hold. Possible values: 'approved', 'approvedOnHold', 'pendingApproval', 'pendingApprovalOnHold'."},"revenueStatus":{"type":"string","description":"The revenue-recognition progress across the contract's lines. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isContractClosed":{"type":"boolean","description":"Whether the contract has been closed, with its open revenue moved to a new combined revenue contract."},"isContractCombined":{"type":"boolean","description":"Whether the contract is the combination target that absorbed a closed contract's open revenue."},"isLongTermContract":{"type":"boolean","description":"Whether the recognition window from revenueStartDate to revenueEndDate exceeds 366 days."},"sspCompliant":{"type":"boolean","description":"Whether every line not excluded from allocation is standalone-selling-price compliant. Absent when every line is excluded from allocation."},"currency":{"type":"string","description":"The currency the contract is denominated in. Every amount on the contract is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"type":"string","description":"The owning entity's functional currency. Present only when it differs from the contract currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the contract currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"entityId":{"type":"string","description":"The legal entity that owns this contract. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this contract."},"customerId":{"type":"string","description":"The customer this contract is with. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer this contract is with."},"salesOrderId":{"type":"string","description":"The sales order this contract was created from. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"type":"string","description":"The number of the sales order this contract was created from."},"modifiedRevenueContractId":{"type":"string","description":"The revenue contract this one was combined or modified into. Absent when there is no such successor. See id on GET accounting/revenue-contracts/:id."},"closeContractDate":{"type":"string","format":"date-time","description":"The date and time the contract was closed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on an open contract."},"migrationDate":{"type":"string","format":"date","description":"The date this contract's opening balances were migrated from a prior system. Format YYYY-MM-DD. Absent on a contract created natively."},"revenueStartDate":{"type":"string","format":"date","description":"The earliest revenue-recognition start date across the contract's lines. Format YYYY-MM-DD."},"revenueEndDate":{"type":"string","format":"date","description":"The latest revenue-recognition end date across the contract's lines. Format YYYY-MM-DD."},"salesEffectiveDate":{"type":"string","format":"date","description":"The book date of the sales order this contract was created from. Format YYYY-MM-DD."},"totalContractValue":{"type":"string","format":"decimal","description":"The total contract value, in the contract currency. It is the total price of the sales order this contract was created from, less the contract's cost-of-contract-value."},"totalContractAmount":{"type":"string","format":"decimal","description":"The total contract amount across the contract's open lines, in the contract currency."},"totalCostOfContractValue":{"type":"string","format":"decimal","description":"The total cost-of-contract-value excluded from the revenue calculation, in the contract currency."},"totalCostOfRevenue":{"type":"string","format":"decimal","description":"The total cost of revenue recognized, in the contract currency."},"totalEstimatedTransactionPrice":{"type":"string","format":"decimal","description":"The total estimated transaction price used in allocation, in the contract currency."},"totalFairValueAmount":{"type":"string","format":"decimal","description":"The total fair value used in allocation, in the contract currency."},"totalVariableConsideration":{"type":"string","format":"decimal","description":"The total variable consideration across the contract's lines, in the contract currency."},"deferredRevenue":{"type":"string","format":"decimal","description":"The deferred revenue not yet recognized, in the contract currency. Zero once the contract is closed."},"revenueAmount":{"type":"string","format":"decimal","description":"The total revenue across the contract's lines, in the contract currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The cumulative revenue recognized to date, in the contract currency."},"revenueRemaining":{"type":"string","format":"decimal","description":"The revenue remaining to be recognized, in the contract currency."},"remainingPerformanceObligation":{"type":"string","format":"decimal","description":"The remaining performance obligation, in the contract currency. It is contract value plus returns and variable consideration, less committed recognized revenue. Zero once the contract is closed."},"unbilledReceivables":{"type":"string","format":"decimal","description":"The sum of unbilled journal entries for this contract, in the contract currency."},"returnedAmount":{"type":"string","format":"decimal","description":"The amount returned against the contract's revenue plan, in the contract currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"The one-time discount allocated across the contract's lines, in the contract currency."},"pctRevenueRecognized":{"type":"string","format":"decimal","description":"The fraction of total contract value recognized to date, from 0 to 1. 1 once the contract is closed. A ratio, not an amount, with no currency of its own."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteRevenueContractId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The contract's identifiers in other systems, one per configured field name. An empty array or absent when the contract has none."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract line."},"revenueContractLineNumber":{"type":"string","description":"The revenue contract line number, unique within the contract."},"type":{"type":"string","description":"The kind of line. Possible values: 'standard', 'thresholdIncrement', 'overage'."},"currency":{"type":"string","description":"The currency the line is denominated in. Every amount on the line and its revenue plan is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"type":"string","description":"The owning entity's functional currency. Present only when it differs from the line currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the line currency to the functional currency. A ratio, not an amount, with no currency of its own."},"generalStatus":{"type":"string","description":"The overall status of the line, combining approval and any active revenue hold. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"revenueStatus":{"type":"string","description":"The revenue-recognition progress for the line. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isClosed":{"type":"boolean","description":"Whether the line has been closed, with its open revenue moved to a combined contract."},"isLongTerm":{"type":"boolean","description":"Whether the line's recognition window exceeds 366 days."},"isEvergreen":{"type":"boolean","description":"Whether the line has no fixed end date and recognizes indefinitely."},"sspCompliant":{"type":"boolean","description":"Whether the line is standalone-selling-price compliant."},"isAllocationExcluded":{"type":"boolean","description":"Whether the line is excluded from the contract's revenue allocation."},"productCode":{"type":"string","description":"The code of the product the line covers, as it stood when the line was created."},"unitOfMeasure":{"type":"string","description":"The unit the line's quantity is measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"performanceObligationName":{"type":"string","description":"The name of the performance obligation the line satisfies."},"operationalPerformanceObligationNumber":{"type":"string","description":"The number of the operational performance obligation the line is tracked under."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template that generated the line's plan."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized over the line's term. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"amortizationMethod":{"type":"string","description":"How the line's amount is spread across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"revenueSchedulingEvent":{"type":"string","description":"The event that starts recognition on the line. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"revenueAccount":{"type":"string","description":"The name of the revenue account the line recognizes into."},"deferredRevenueAccount":{"type":"string","description":"The name of the deferred-revenue account the line defers into."},"revRecStartDate":{"type":"string","format":"date","description":"The first day of the line's revenue-recognition window. Format YYYY-MM-DD."},"revRecEndDate":{"type":"string","format":"date","description":"The last day of the line's revenue-recognition window, inclusive. Format YYYY-MM-DD."},"salesOrderBookingDate":{"type":"string","format":"date","description":"The book date of the sales order line this line was created from. Format YYYY-MM-DD."},"revenueTerm":{"type":"string","format":"decimal","description":"The length of the line's revenue term, in the line's scheduling unit. A count, not an amount."},"salesOrderProductLine":{"type":"string","description":"The number of the sales order product line this line was created from."},"contractAmount":{"type":"string","format":"decimal","description":"The contract amount booked on the line, in the line currency."},"adjustedContractAmount":{"type":"string","format":"decimal","description":"The contract amount after modifications, in the line currency."},"listPrice":{"type":"string","format":"decimal","description":"The undiscounted list price of the line, in the line currency."},"totalContractValue":{"type":"string","format":"decimal","description":"The total contract value attributed to the line, in the line currency."},"totalCostOfContractValue":{"type":"string","format":"decimal","description":"The cost-of-contract-value excluded from the line's revenue calculation, in the line currency."},"costOfRevenueAmount":{"type":"string","format":"decimal","description":"The cost of revenue booked on the line, in the line currency."},"costOfRevenueRecognized":{"type":"string","format":"decimal","description":"The cost of revenue recognized to date on the line, in the line currency."},"estimatedTransactionPrice":{"type":"string","format":"decimal","description":"The estimated transaction price used for the line in allocation, in the line currency."},"fairValueAmount":{"type":"string","format":"decimal","description":"The fair value used for the line in allocation, in the line currency."},"variableConsideration":{"type":"string","format":"decimal","description":"The variable consideration on the line, in the line currency."},"extendedSSP":{"type":"string","format":"decimal","description":"The extended standalone selling price of the line, unit standalone selling price times quantity, in the line currency."},"revenueAmount":{"type":"string","format":"decimal","description":"The revenue allocated to the line, in the line currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The revenue recognized to date on the line, in the line currency."},"revenueRemaining":{"type":"string","format":"decimal","description":"The revenue still to be recognized on the line, in the line currency."},"deferredRevenueAmount":{"type":"string","format":"decimal","description":"The deferred revenue outstanding on the line, in the line currency."},"remainingPerformanceObligation":{"type":"string","format":"decimal","description":"The remaining performance obligation on the line, in the line currency."},"unbilledReceivables":{"type":"string","format":"decimal","description":"The unbilled receivables on the line, in the line currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The revenue on the line not yet scheduled into a plan period, in the line currency."},"totalInvoicedAmount":{"type":"string","format":"decimal","description":"The total invoiced against the line to date, in the line currency."},"oneTimeDiscountAllocationAmount":{"type":"string","format":"decimal","description":"The one-time discount allocated to the line, in the line currency."},"fvAllocationRatio":{"type":"string","format":"decimal","description":"The share of the contract's fair value allocated to the line, from 0 to 1. A ratio, not an amount, with no currency of its own."},"revenuePlanHeader":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue plan header."},"revenuePlanHeaderNumber":{"type":"string","description":"The revenue plan header number."},"status":{"type":"string","description":"The status of the plan. Possible values: 'notStarted', 'pendingRecognition', 'inProgress', 'complete', 'completeModified'."},"currency":{"type":"string","description":"The currency the plan is denominated in. Every amount on the plan and its plan lines is in this currency. Format ISO 4217, for example 'USD'."},"amortizationMethod":{"type":"string","description":"How the plan spreads its amount across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"revenueSchedulingEvent":{"type":"string","description":"The event that starts recognition on the plan. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"isContractClosed":{"type":"boolean","description":"Whether the contract behind the plan has been closed."},"revRecStartDate":{"type":"string","format":"date","description":"The first day of the plan's recognition window. Format YYYY-MM-DD."},"revRecEndDate":{"type":"string","format":"date","description":"The last day of the plan's recognition window, inclusive. Format YYYY-MM-DD."},"comments":{"type":"string","description":"Free-form comments recorded on the plan."},"amount":{"type":"string","format":"decimal","description":"The total amount the plan schedules, in the plan currency."},"totalRecognized":{"type":"string","format":"decimal","description":"The total recognized across the plan's lines to date, in the plan currency."},"remainingDeferred":{"type":"string","format":"decimal","description":"The amount still deferred on the plan, in the plan currency."},"returnedAmount":{"type":"string","format":"decimal","description":"The amount returned against the plan, in the plan currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The plan amount not yet scheduled into a period, in the plan currency."},"revenuePlanLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue plan line."},"lineId":{"type":"string","description":"The line identifier within the plan."},"revenuePlanType":{"type":"string","description":"What the plan line schedules. Possible values: 'revenueRecognition', 'returnRevenueRecognition', 'unCommittedRevenueRecognition', 'modificationDeferredRevenueAdjustment', 'allowance', 'overage', 'usageExpiration', 'costOfRevenue', 'unholdRevenuePeriod', 'retrospectiveAdjustment'."},"currency":{"type":"string","description":"The currency the plan line is denominated in. Format ISO 4217, for example 'USD'."},"plannedPeriod":{"type":"string","description":"The name of the accounting period this row is planned for."},"plannedPeriodDate":{"type":"string","format":"date","description":"The start date of the planned accounting period. Format YYYY-MM-DD. Plan lines are returned in ascending order of this date."},"postingPeriod":{"type":"string","description":"The name of the accounting period the row was posted in, when it differs from the planned one."},"isPosted":{"type":"boolean","description":"Whether the row has been posted to the general ledger."},"holdStatus":{"type":"string","description":"Whether revenue on the row is held back. Possible values: 'notHold', 'holdPlaced', 'holdRemoved'."},"releaseUnit":{"type":"string","description":"The unit the release amount is expressed in. Possible values: 'quantity', 'percent', 'amount'."},"releaseAmount":{"type":"string","format":"decimal","description":"The amount or quantity released in this period, in the unit given by releaseUnit."},"pctRecognizedInPeriod":{"type":"string","format":"decimal","description":"The fraction of the plan recognized in this period, from 0 to 1. A ratio, not an amount, with no currency of its own."},"cumulativePercentage":{"type":"string","format":"decimal","description":"The fraction of the plan recognized cumulatively through this period, from 0 to 1. A ratio, not an amount, with no currency of its own."},"revenueAccount":{"type":"string","description":"The name of the revenue account this row recognizes into."},"deferredRevenueAccount":{"type":"string","description":"The name of the deferred-revenue account this row releases from."},"journalEntry":{"type":"string","description":"The number of the journal entry this row posted through, once posted."},"amount":{"type":"string","format":"decimal","description":"The amount scheduled for this period, in the plan line currency."},"revenueAmount":{"type":"string","format":"decimal","description":"The revenue scheduled for this period, in the plan line currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The revenue recognized in this period, in the plan line currency."},"cumulativeRecognition":{"type":"string","format":"decimal","description":"The revenue recognized cumulatively through this period, in the plan line currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The amount on this row not yet scheduled, in the plan line currency."},"postedAmount":{"type":"string","format":"decimal","description":"The amount actually posted to the ledger for this row, in the plan line currency."}},"additionalProperties":false,"required":["id","revenuePlanType","currency"]},"description":"The plan's period rows, the recognition schedule, one entry per planned period, earliest planned period first. An empty array when the plan has not been scheduled yet."}},"additionalProperties":false,"required":["id","currency","revenueSchedulingEvent","isContractClosed"],"description":"The line's revenue plan, the schedule revenue is recognized against. At most one per line. Absent when no plan has been generated for the line yet."}},"additionalProperties":false,"required":["id","type","currency","isClosed","revenueSchedulingEvent"]},"description":"The contract's revenue lines, in line order, each with its revenue plan nested. An empty array when the contract has no lines."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue contract last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","approvalStatus","isContractClosed","isContractCombined","currency","exchangeRate","lastModifiedDate"]},"deleteAccountingProductLineOutput":{"type":"object","properties":{},"additionalProperties":false},"approveSalesOrderOutput":{"type":"object","properties":{},"additionalProperties":false},"approveSalesOrderInput":{"type":"object","properties":{},"additionalProperties":false},"createCustomerOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created customer.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]}},"additionalProperties":false,"required":["id"]},"createCustomerInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the customer, as it appears on invoices.","examples":["Example Robotics Inc"]},"entityId":{"type":"string","description":"The legal entity that invoices this customer. To move the customer to another legal entity later, use PATCH accounting/customers/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"customerType":{"type":"string","description":"The customer type. Accepted values: 'default', 'partner'. Defaults to 'default'. 'endCustomer' is not supported and fails with END_CUSTOMER_NOT_SUPPORTED.","examples":["default"]},"partnerType":{"type":"string","description":"The partner type, for a customer whose customerType is 'partner'. Accepted values: 'reseller', 'thirdPartyPayer'."},"businessType":{"type":"string","description":"The business type of the customer. Accepted values: 'company', 'individual'. Defaults to 'company'.","examples":["company"]},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to.","examples":["billing@example-robotics.com"]},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax. Defaults to false."},"defaultCurrency":{"type":"string","description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code. Defaults to the legal entity's currency.","examples":["USD"]},"segment":{"type":"string","description":"The market segment of the customer. Accepted values: 'SMB', 'MidMarket', 'Enterprise'. Ignored when businessType is 'individual'."},"exemptionNumber":{"type":"string","description":"The tax-exemption certificate number. Accepted only when taxExempt is true. Otherwise the request fails with EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT."},"paymentTermCode":{"type":"string","description":"The code of a payment term on the customer's legal entity's list. A code that is not on the list fails with UNKNOWN_REFERENCE. See code on GET accounting/payment-terms."},"parentId":{"type":"string","description":"The id of the parent customer. An unknown id fails with UNKNOWN_REFERENCE."},"partnerId":{"type":"string","description":"The id of the partner this customer buys through. An unknown id fails with UNKNOWN_REFERENCE."},"salesChannel":{"type":"string","description":"The sales channel for this customer. Accepted values: 'salesAssisted' (sold through a salesperson), 'selfServe'."},"additionalContactEmail":{"type":"string","description":"Another email address for the customer, besides invoiceEmail and mainEmail."},"mainContactName":{"type":"string","description":"The name of the customer's main contact."},"preferredLanguage":{"type":"string","description":"The customer's preferred language. Accepted values: 'english'."},"crmCustomerId":{"type":"string","description":"The customer's identifier in an external CRM system."},"businessIdentificationNumber":{"type":"string","description":"The customer's business registration number."},"invoiceConsolidation":{"type":"string","description":"How the customer's invoices are consolidated. Accepted values: 'customer', 'purchaseOrderNumber', 'salesArrangement'."},"invoiceDeliveryMode":{"type":"string","description":"How invoices are delivered to the customer. Accepted values: 'manual', 'automated'."},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether the customer is exempt from credit-card fees. Defaults to false."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel and expense items appear on invoices. Accepted values: 'detailed', 'consolidated'. Defaults to 'detailed'."},"status":{"type":"string","description":"The status of the customer. Accepted values: 'active', 'inactive'. Defaults to 'active'."},"taxExemptCode":{"type":"string","description":"The tax-exemption reason code. Cleared when taxExempt is false."},"taxRegistrations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"The country the registration applies in, as an ISO 3166-1 code."},"taxNumber":{"type":"string","description":"The tax identification number issued by the tax authority."},"type":{"type":"string","description":"The kind of tax registration. Accepted values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'."},"effectiveDate":{"type":"string","format":"date","description":"The date the registration takes effect. Use format YYYY-MM-DD."},"isActive":{"type":"boolean","description":"Whether the registration is active. Only one active registration is allowed per country and tax type. Defaults to true."}},"additionalProperties":false,"required":["country","taxNumber","type"]},"description":"The customer's tax registrations."},"payment":{"type":"object","properties":{"provider":{"type":"string","description":"The name of a payment provider connected to your tenant. An unknown name fails with UNKNOWN_PAYMENT_PROVIDER, which lists the connected providers. Required when any other payment field is sent. Example: 'Stripe'."},"externalCustomerId":{"type":"string","description":"The customer's identifier in the payment provider's system."},"externalPaymentMethodId":{"type":"string","description":"The customer's default payment method in the payment provider's system."}},"additionalProperties":false,"description":"The customer's link to a payment provider. `externalPaymentMethodId` requires `externalCustomerId` in the same request."},"addresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Accepted values: 'billTo', 'soldTo'."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"isDefault":{"type":"boolean","description":"Whether this entry is the default address of its type."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","line1","city","country","zipCode"]},"description":"The customer's addresses. Mark at most one entry per type as the default with isDefault. When a type has none marked, its first entry is the default.","examples":[[{"type":"billTo","line1":"500 Market St","city":"San Francisco","stateProvince":"CA","country":"US","zipCode":"94105","isDefault":true}]]},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The customer's identifiers in other systems, one per configured field name. A field name not configured for your tenant fails with UNKNOWN_EXTERNAL_IDENTIFIER."}},"additionalProperties":false,"required":["name","entityId"]},"getAccountOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account."},"accountNumber":{"type":"string","description":"The account number, unique within its chart of accounts."},"accountName":{"type":"string","description":"The display name of the account."},"accountType":{"type":"string","description":"The top-level classification of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'."},"accountSubType":{"type":"string","description":"A finer classification within accountType. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Absent when none is assigned."},"accountStatus":{"type":"string","description":"The lifecycle status of the account. Possible values: 'enabled' (available on transactions), 'disabled' (not available for new transactions), 'draft' (created but not yet reviewed), 'draftErrors' (a draft with validation errors to resolve before it can be enabled)."},"description":{"type":"string","description":"A free-form description of the account. Absent when none was set."},"chartOfAccountsId":{"type":"string","description":"The identifier of the chart of accounts this account belongs to. An account belongs to exactly one. See id on GET accounting/chart-of-accounts/:id."},"parentAccountId":{"type":"string","description":"The identifier of the parent account this account rolls up to. Absent for a top-level account. See id on GET accounting/accounts/:id."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Balances from child accounts aggregate here, and journal entries cannot be posted to it directly."},"entityId":{"type":"string","description":"The identifier of the legal entity this account is denominated for. Set only on bank and credit-card accounts. See id on GET base/entities."},"currency":{"type":"string","description":"The account's currency. Format ISO 4217, for example 'USD'. Set only on accounts linked to a cash account, alongside entityId."},"revaluation":{"type":"boolean","description":"Whether balances on this account are revalued for exchange-rate changes."},"payOnBehalf":{"type":"boolean","description":"Whether this account takes part in pay-on-behalf accounting."},"elimination":{"type":"boolean","description":"Whether this account is eliminated during consolidation."},"exchangeRateType":{"type":"string","description":"Which rate translates this account's amounts on revaluation. Possible values: 'historical', 'average', 'current'. Absent on grouping accounts."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the account record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. It is the fieldName of an existing account external-identifier configuration."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. An empty array when the account has none."}},"additionalProperties":false,"required":["id","accountNumber","accountName","accountType","chartOfAccountsId","groupingAccount","lastModifiedDate"]},"booksRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the accounting book."},"name":{"type":"string","description":"The display name of the accounting book."},"type":{"type":"string","description":"The kind of accounting book. Possible values: 'full', 'adjustment'. An adjustment book adjusts the full book named in baseBookId."},"accountingStandard":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting standard the book follows, for example 'IFRS' or 'US GAAP'. Absent when none is set."},"consolidation":{"type":"boolean","description":"Whether the book consolidates other books or entities."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the accounting book. Absent when none is set."},"baseBookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full book this adjustment book adjusts. Absent for a full book. See id on GET accounting/books/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the accounting book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"debitMemosRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo."},"debitMemoNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The debit memo number, for example 'DM-1'. Absent while none has been assigned."},"creditMemoId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source credit memo this debit memo settles. Absent on a standalone debit memo. See id on GET accounting/credit-memos/:id."},"creditMemoNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the source credit memo. Present whenever creditMemoId is."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo was issued. Format YYYY-MM-DD."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the debit memo falls due. Format YYYY-MM-DD. Computed from debitMemoDate plus the payment term's days."},"taxDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status of the debit memo. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved debit memo has financial effect."},"debitMemoStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'disputed'. Absent before approval."},"debitMemoType":{"type":"string","description":"The reason key for the charge, for example 'orderEntryError'. The accepted keys are configured per tenant."},"currency":{"type":"string","description":"The currency of the debit memo. Format ISO 4217, for example 'USD'. It governs every amount on the record."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer the debit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the customer."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that issued the debit memo. See id on GET base/entities."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the issuing legal entity."},"paymentTerm":{"type":"string","description":"The payment-term key applied to the debit memo. See code on GET accounting/payment-terms."},"purchaseOrder":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's own purchase-order reference."},"customerMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-text message shown to the customer on the document."},"externalDebitMemoId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this debit memo in an external source system."},"isMigrated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed."},"debitGlAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The general ledger account the journal entry debits for the debit memo's full amount. See id on GET accounting/accounts/:id."},"billToAddressId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bill-to address on the document. There is no endpoint for it."},"soldToAddressId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sold-to address on the document. There is no endpoint for it."},"subtotal":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of the lines' pre-discount totals, in the debit memo currency."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total including tax, in the debit memo currency."},"totalTax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total tax across all lines, in the debit memo currency."},"totalAmountDebited":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The gross amount debited, in the debit memo currency."},"lineDiscounts":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of the prorated discount amounts across all lines, in the debit memo currency."},"unappliedCreditAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"payInvoiceOutput":{"type":"object","properties":{"paymentId":{"type":"string","description":"The unique identifier for the payment created. Read it back with GET accounting/payments/:id, or re-read the invoice for its updated balance.","examples":["7d41e9b2-58c6-4a03-9e17-2b8f0c5d6a39"]}},"additionalProperties":false,"required":["paymentId"]},"payInvoiceInput":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount paid, in the invoice's currency. Must be greater than zero and may not exceed the amount still due.","examples":["1210.00"]},"paymentDate":{"type":"string","format":"date","description":"The date the payment was received or settled. Format YYYY-MM-DD. It drives the ledger posting and the reporting period.","examples":["2026-09-15"]},"paymentType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"How the payment was tendered.","examples":["wire"]},"paymentNote":{"type":"string","description":"A free-text note recorded on the payment, for example a bank reference or check number.","examples":["Remittance ref 88213"]},"bankFeeAmount":{"type":"string","format":"decimal","description":"The fee the bank or processor deducted, in the invoice's currency. Recorded on the payment rather than subtracted from it. Send the gross amount in amount.","examples":["12.50"]}},"additionalProperties":false,"required":["amount","paymentDate","paymentType"]},"updateAccountingProductLinePricingOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingProductLinePricingInput":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"priceBookEntriesToCreate":{"type":"array","items":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. Required when the product line is priced 'flat' or 'perUnit'."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Omit on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["unitOfMeasure"],"description":"The rate-card entry to attach. Provide only on rate-card-priced entries."}},"additionalProperties":false},"description":"The price book entries to add to the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."},"priceBookEntriesToUpdate":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","description":"The unique identifier of the price book entry you want to update. The entry must belong to this pricing header, or the request fails with UNKNOWN_PRICE_BOOK_ENTRY_IDS."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"rateCardEntryId":{"type":"string","description":"The unique identifier of the rate-card entry you want to update. The rate-card entry must belong to this price book entry, or the request fails with UNKNOWN_RATE_CARD_ENTRY_IDS."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["rateCardEntryId"],"description":"Changes to the entry's rate-card entry. Provide only on rate-card-priced entries."}},"additionalProperties":false,"required":["entryId"]},"description":"Changes to existing price book entries of the pricing header. Only the fields you send change."},"priceBookEntriesToDelete":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the price book entries to delete from the pricing header. Deleting an entry also deletes its rate-card entry. Each entry must belong to this pricing header, or the request fails with UNKNOWN_PRICE_BOOK_ENTRY_IDS."}},"additionalProperties":false},"getIngestionStatusOutput":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"dataExtractionId":{"type":"number","description":"The identifier of the ingestion job, returned unchanged."},"name":{"type":"string","description":"The name recorded for this ingestion, usually the original file name. Absent when none is set."},"mapping":{"type":"string","description":"The column mapping applied to this ingestion. An empty string when the default schema was used."},"extractedData":{"type":"array","items":{"type":"object","properties":{"everestId":{"type":"number","description":"The internal identifier assigned to the row once it is processed. Absent until then."},"status":{"type":"string","description":"The processing status of this row, for example 'PENDING', 'Staged', 'Integrated' or 'FAILED'."},"isActive":{"type":"boolean","description":"Whether this row is currently active. An inactive row stays visible for audit but is left out of downstream billing."},"error":{"type":"string","description":"The reason the row failed. Present only when status is a failure."},"trackId":{"type":"string","description":"The trackId you supplied for this row at ingestion. Absent when you supplied none."}},"additionalProperties":false,"required":["status","isActive"]},"description":"The per-record outcomes, one entry for each row of the ingested payload."}},"additionalProperties":false,"required":["dataExtractionId","mapping","extractedData"]},{"type":"null"}],"description":"The status of the ingestion job. Null when no job matches dataExtractionId."}},"additionalProperties":false},"getPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment."},"paymentNumber":{"type":"string","description":"The payment number, unique within the tenant. A human-readable reference used for reconciliation."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"The payment method. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'."},"paymentAccountCurrency":{"type":"string","description":"The currency of the bank account the payment was received into. Present only when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The amount paid, in the payment currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The portion already applied to invoices, in the payment currency. The sum of the payment's applications."},"unappliedAmount":{"type":"string","format":"decimal","description":"The portion not yet applied to any invoice, in the payment currency. unappliedAmount = amount - appliedAmount - refundAmount."},"refundAmount":{"type":"string","format":"decimal","description":"The portion refunded through approved refunds, in the payment currency."},"bankFeeAmount":{"type":"string","format":"decimal","description":"The bank fee deducted from the payment, in the payment currency."},"smallBalanceWriteOffAmount":{"type":"string","format":"decimal","description":"The total written off as a small residual balance across the payment's applications, in the payment currency."},"totalEarlyPaymentDiscount":{"type":"string","format":"decimal","description":"The total early-payment discount granted across the payment's applications, in the payment currency."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the payment currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"customerPaymentStatus":{"type":"string","description":"The derived lifecycle status of the payment. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull', 'partiallyRefunded', 'refunded', 'disputed', 'chargedBack'."},"disputeStatus":{"type":"string","description":"The dispute state of the payment. Possible values: 'disputed', 'chargedBack'. Absent on an undisputed payment."},"paymentReference":{"type":"string","description":"The reference the payer supplied with the payment, for example a remittance or wire reference. Absent when none was supplied."},"paymentNote":{"type":"string","description":"A free-form note recorded on the payment. Absent when none was set."},"customerId":{"type":"string","description":"The customer the payment came from. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer the payment came from."},"thirdPartyPayerId":{"type":"string","description":"The customer who actually paid, when a third party paid on the invoiced customer's behalf. Absent when the invoiced customer paid. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity that received the payment. See id on GET base/entities."},"accountId":{"type":"string","description":"The ledger account the payment was posted to. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the ledger account the payment was posted to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","paymentDate","paymentType","currency","lastModifiedDate"]},"amortizationScheduleLinesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this amortization schedule line."},"amortizationScheduleHeaderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the amortization schedule this line belongs to. Several lines, one per period, share it. There is no endpoint for the schedule itself."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this schedule line belongs to. See id on GET base/entities. Absent when the schedule's source journal entry line is missing. Such a schedule line is still returned, but doesn't match an entityId filter."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this schedule line belongs to."},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the accounting book this schedule posts into. See id on GET accounting/books/:id."},"bookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the accounting book this schedule posts into."},"scheduledPeriodId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting period this schedule line is scheduled in. See accountingPeriodId on GET accounting/accounting-periods. To check whether a period close is blocked, filter on scheduledPeriodEndDate instead, because this filter misses earlier schedule lines that aren't posted."},"scheduledPeriodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the scheduled period as its fiscal calendar defines it, for example 'Aug 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"scheduledPeriodStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the scheduled period, inclusive. Format YYYY-MM-DD."},"scheduledPeriodEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the scheduled period, inclusive. Format YYYY-MM-DD. For a period-close check, filter on this date: it finds every schedule line due on or before the period being closed."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount of this schedule line, in the currency given by transactionCurrency."},"transactionCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency that denominates amount, taken from the schedule's source journal entry line. Format ISO 4217, for example 'USD'. Absent on a row whose header or source document was deleted. A query that does not filter by book can return rows in several currencies."},"amortizationMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the schedule spreads its total, from the header. Possible values: 'straightLine', 'straightLineProRateFirstLast', 'exactDays', 'pointInTime', 'usageBased'."},"amortizationStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the amortization schedule. Format YYYY-MM-DD. This is the schedule's start, not this schedule line's period."},"amortizationEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day the schedule amortizes over, from the header. Format YYYY-MM-DD."},"isJournalEntryPosted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this schedule line's journal entry has been posted. To find schedule lines still to post, filter on outstanding instead."},"isConfirmedZero":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this schedule line was confirmed as zero, so no journal entry is needed. Absent means not confirmed. To find schedule lines still to post, filter on outstanding."},"outstanding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this schedule line still needs a journal entry: true when its journal entry isn't posted and it isn't confirmed as zero. Filter on this for a period-close check."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time this schedule line last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It tracks the line itself, so a change to the header or the joined entity, book or period does not advance it."}},"additionalProperties":false},"fundTransfersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fund transfer."},"fundTransferNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fund transfer number, for example 'FT-71122'. Absent while none has been assigned."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the fund transfer."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the transfer."},"transferDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the money moved. Format YYYY-MM-DD."},"transferAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount moved, in the transfer currency."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transfer currency. Format ISO 4217, for example 'USD'. transferAmount is in this currency."},"isVoided":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the transfer has been voided. A voided transfer is kept for audit rather than deleted."},"isIntercompany":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the transfer moves money between two legal entities rather than between two accounts of one entity. When true, toEntityId names the receiving entity."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system or process the transfer came from."},"externalPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this payment in the external system that initiated the transfer. It is not unique."},"fromAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the account the money left."},"toAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the account the money arrived in."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the transfer is posted under."},"toEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the receiving legal entity on an intercompany transfer."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the fund transfer last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getSubscriptionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the subscription."},"subscriptionNumber":{"type":"string","description":"The subscription number. Unique within the tenant. Example: 'SUB-1'."},"customerId":{"type":"string","description":"The customer this subscription belongs to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer this subscription belongs to. See name on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity that owns this subscription. See id on GET base/entities."},"currency":{"type":"string","description":"The currency of annualRecurringRevenue and monthlyRecurringRevenue. Format ISO 4217, for example 'USD'."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The length of the auto-renewal term, in the subscription's term unit."},"renewalPriceChangePercentage":{"type":"string","format":"decimal","description":"The percentage by which the price changes on renewal."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"subscriptionStatus":{"type":"string","description":"The status of the subscription, derived from the status of its lines. Possible values: 'pendingActivation', 'notStarted', 'active', 'pendingOrderApproval', 'canceled', 'suspended'."},"serviceStartDateBasis":{"type":"string","description":"How the service start date is determined. Possible values: 'fixedDate', 'serviceActivation'."},"serviceActivationDate":{"type":"string","format":"date","description":"The date service was activated. Set only when serviceStartDateBasis is 'serviceActivation'. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The latest service end date across all of the subscription's lines. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"submissionDate":{"type":"string","format":"date","description":"The submission date of the sales order this subscription came from. Format YYYY-MM-DD."},"cancellationDate":{"type":"string","format":"date","description":"The date from which the subscription is or will be canceled. Absent when no cancellation has been recorded. Format YYYY-MM-DD."},"cancellationNote":{"type":"string","description":"A note about the cancellation."},"cancellationReason":{"type":"string","description":"The reason code for the cancellation. Possible values: 'noReasonGiven', 'budgetary', 'movingToCompetitors', 'lowCustomerSatisfaction', 'bankruptcy', 'acquisitionMerger'. Absent when the subscription has not been canceled."},"isCancellationEnabled":{"type":"boolean","description":"Whether the cancellation procedure has been applied to this subscription."},"suspensionDate":{"type":"string","format":"date","description":"The date from which the subscription is or will be suspended. Absent when no suspension has been recorded. Format YYYY-MM-DD."},"suspensionNote":{"type":"string","description":"A note about the suspension."},"suspensionReason":{"type":"string","description":"The reason code for the suspension. Possible values: 'unpaidBalance', 'invalidPaymentMethod'. Absent when the subscription has not been suspended."},"isSuspensionEnabled":{"type":"boolean","description":"Whether the suspension process is enabled for this subscription."},"externalSubscriptionId":{"type":"string","description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annual recurring revenue, in the subscription's currency: the sum of annualRecurringRevenue across its active and suspended lines."},"monthlyRecurringRevenue":{"type":"string","format":"decimal","description":"The monthly recurring revenue, in the subscription's currency: the sum of monthlyRecurringRevenue across its active and suspended lines."},"totalUserCount":{"type":"string","format":"decimal","description":"The number of active users or seats across the subscription's active lines."},"prepaidBalance":{"type":"string","format":"decimal","description":"The prepaid balance remaining for this subscription, summed across the prepaid balances linked to it. The balance is a quantity, not a currency amount."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the subscription line."},"subscriptionLineNumber":{"type":"string","description":"The subscription line number. Unique within the tenant."},"productName":{"type":"string","description":"The name of the product this line covers."},"quantity":{"type":"string","format":"decimal","description":"The quantity currently on this line, summed across its sales order product lines."},"currency":{"type":"string","description":"The currency of annualRecurringRevenue and monthlyRecurringRevenue on this line. Format ISO 4217, for example 'USD'."},"subscriptionLineStatus":{"type":"string","description":"The status of this line. Possible values: 'pendingActivation', 'notStarted', 'active', 'pendingOrderApproval', 'canceled', 'suspended'."},"serviceStartDate":{"type":"string","format":"date","description":"The date service starts for this line. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The date service ends for this line: the later of customServiceEndDate and maxSalesOrderProductLineServiceEndDate. When the subscription is cancelable and has a cancellationDate, serviceEndDate is maxSalesOrderProductLineServiceEndDate. Format YYYY-MM-DD."},"customServiceEndDate":{"type":"string","format":"date","description":"The service end date set on this line by a subscription modification, such as extending the term or ending the line. Absent when no modification has set one. Format YYYY-MM-DD."},"maxSalesOrderProductLineServiceEndDate":{"type":"string","format":"date","description":"The latest service end date across this line's sales order product lines. Format YYYY-MM-DD."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annual recurring revenue of this line, in the line's currency. The value counts only while subscriptionLineStatus is 'active' or 'suspended', and is 0 otherwise."},"monthlyRecurringRevenue":{"type":"string","format":"decimal","description":"The monthly recurring revenue of this line, in the line's currency. monthlyRecurringRevenue = annualRecurringRevenue / 12."},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The sales order. See id on GET accounting/sales-orders/:id."},"orderNumber":{"type":"string","description":"The sales order number. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."}},"additionalProperties":false,"required":["id"]},"description":"The sales orders that carry this line, oldest first. An empty array when no sales order carries it."}},"additionalProperties":false,"required":["id","currency","salesOrders"]},"description":"The subscription's lines, one for each product on the subscription, oldest first. An empty array when the subscription has none."},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The sales order. See id on GET accounting/sales-orders/:id."},"orderNumber":{"type":"string","description":"The sales order number. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."}},"additionalProperties":false,"required":["id"]},"description":"The sales orders that carry this subscription, oldest first: the order that created it, then every later upsell, renewal or replacement. An empty array when no sales order carries it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the subscription last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","currency","termType","lines","salesOrders","lastModifiedDate"]},"createCreditCardEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created credit card entry.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createCreditCardEntryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the entry is posted under. See id on GET base/entities.","examples":["e8dc29b9-7e79-4709-bb32-95938bcb1bd1"]},"creditCardAccountId":{"type":"string","description":"The general-ledger account behind the credit card account this entry posts against. See id on GET accounting/accounts/:id.","examples":["f50164c3-85e3-4dab-986e-3fdb39f8ecc1"]},"transactionDate":{"type":"string","format":"date","description":"The date the transaction took place. Use format YYYY-MM-DD. It decides the posting period.","examples":["2026-02-14"]},"currency":{"type":"string","description":"The currency of the entry. Format ISO 4217, for example 'USD'. It governs every amount on the entry. Omit to use the account's own currency. When supplied it must match the account's currency.","examples":["USD"]},"status":{"type":"string","description":"The reconciliation status. Accepted values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'. Defaults to 'Unmatched'.","examples":["unmatched"]},"name":{"type":"string","description":"A short name for the entry.","examples":["February bank fees"]},"description":{"type":"string","description":"A free-form description of the entry."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD."},"origin":{"type":"string","description":"The system or process the entry originated from."},"externalUrl":{"type":"string","description":"A link to the entry in the originating system."},"lines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage is supplied. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Required, because the schedule lines are created from it when the entry's journal entry is posted."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. Only a prepaid line may carry them: on any other line they are refused with AMORTIZATION_NOT_ALLOWED_ON_LINE. Because lineType is derived from the account's sub-type when omitted, a line that resolves to a non-prepaid account is refused the same way."}},"additionalProperties":false,"required":["accountId","amount"]},"description":"The lines of the entry, in the order they appear. At least one is required. No line may be zero, and the lines may not sum to zero.","examples":[[{"accountId":"9994c3ed-f812-44c1-9454-7f36b2bfb0fb","amount":"-125.00","description":"Account maintenance fee","lineType":"oneTime"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the entry, each naming an already-uploaded file by its id. Required on a tenant configured to require an attachment."}},"additionalProperties":false,"required":["entityId","creditCardAccountId","transactionDate","lines"]},"searchRevenueSchedulingTemplateOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue scheduling template."},"revenueSchedulingTemplateNumber":{"type":"string","description":"The template number, unique within the tenant, for example 'RST-0007'. Absent while none has been assigned."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized under this template. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"revenueSchedulingEvent":{"type":"string","description":"The event that creates a revenue plan under this template. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"amortizationMethod":{"type":"string","description":"How the scheduled amount is spread over the plan's periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. Absent when the recognition pattern does not spread revenue over time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue scheduling template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","revenueSchedulingTemplateName","revenueRecognitionPattern","revenueSchedulingEvent","lastModifiedDate"]},"description":"The revenue scheduling templates that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchRevenueSchedulingTemplateInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the revenue scheduling template with this identifier. The match is exact."},"revenueSchedulingTemplateNumber":{"type":"string","description":"Limits results to the template with this template number. The match is exact."},"revenueSchedulingTemplateName":{"type":"string","description":"Limits results to the template with this exact name. The match is case-sensitive. Takes precedence over nameContains when both are sent."},"nameContains":{"type":"string","description":"Limits results to templates whose name contains this text. The match is case-insensitive. Ignored when revenueSchedulingTemplateName is also sent."},"revenueRecognitionPattern":{"type":"string","description":"Limits results to templates with this recognition pattern. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'. Any other value matches nothing."},"revenueSchedulingEvent":{"type":"string","description":"Limits results to templates triggered by this event. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'. Any other value matches nothing."},"amortizationMethod":{"type":"string","description":"Limits results to templates with this amortization method. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. Any other value matches nothing."}},"additionalProperties":false,"description":"The filters to apply. A revenue scheduling template must match every filter you send. Omit to return all revenue scheduling templates."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of templates per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"invoiceFrequencyTemplatesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice frequency template."},"name":{"type":"string","description":"The name of the invoice frequency template. Example: 'Twice Monthly'."},"rule":{"type":"string","description":"The rule that sets the template's invoice dates. Format RFC 5545 RRULE. BYMONTHDAY=-1 means the last day of the month, whatever its length. Example: 'FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=15,-1', for the 15th and the last day of every month."},"isEvenInvoicing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the amount for a billing period is split evenly across the period's invoices. When false, the amount is split by the number of days each invoice covers. A partial period is split by days either way. The setting applies to recurring product lines, not usage lines."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the invoice frequency template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchDebitMemoOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo."},"debitMemoNumber":{"type":"string","description":"The debit memo number, for example 'DM-1'. Absent while none has been assigned."},"creditMemoId":{"type":"string","description":"The source credit memo this debit memo settles. Absent on a standalone debit memo. See id on GET accounting/credit-memos/:id."},"creditMemoNumber":{"type":"string","description":"The number of the source credit memo. Present whenever creditMemoId is."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo was issued. Format YYYY-MM-DD."},"dueDate":{"type":"string","format":"date","description":"The date the debit memo falls due. Format YYYY-MM-DD. Computed from debitMemoDate plus the payment term's days."},"taxDate":{"type":"string","format":"date","description":"The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate."},"approvalStatus":{"type":"string","description":"The approval status of the debit memo. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved debit memo has financial effect."},"debitMemoStatus":{"type":"string","description":"The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'disputed'. Absent before approval."},"debitMemoType":{"type":"string","description":"The reason key for the charge, for example 'orderEntryError'. The accepted keys are configured per tenant."},"currency":{"type":"string","description":"The currency of the debit memo. Format ISO 4217, for example 'USD'. It governs every amount on the record."},"customerId":{"type":"string","description":"The customer the debit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer."},"customerNumber":{"type":"string","description":"The customer number."},"entityId":{"type":"string","description":"The legal entity that issued the debit memo. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"paymentTerm":{"type":"string","description":"The payment-term key applied to the debit memo. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"customerMessage":{"type":"string","description":"A free-text message shown to the customer on the document."},"externalDebitMemoId":{"type":"string","description":"The identifier of this debit memo in an external source system."},"isMigrated":{"type":"boolean","description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed."},"debitGlAccountId":{"type":"string","description":"The general ledger account the journal entry debits for the debit memo's full amount. See id on GET accounting/accounts/:id."},"billToAddressId":{"type":"string","description":"The bill-to address on the document. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address on the document. There is no endpoint for it."},"subtotal":{"type":"string","format":"decimal","description":"The sum of the lines' pre-discount totals, in the debit memo currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total including tax, in the debit memo currency."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the debit memo currency."},"totalAmountDebited":{"type":"string","format":"decimal","description":"The gross amount debited, in the debit memo currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of the prorated discount amounts across all lines, in the debit memo currency."},"unappliedCreditAmount":{"type":"string","format":"decimal","description":"The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo line."},"lineNumber":{"type":"string","description":"The sequential line number within the debit memo."},"description":{"type":"string","description":"A free-text line description, shown to the customer."},"productId":{"type":"string","description":"The debited product. Absent on a free-text line. See id on GET accounting/products/:id."},"creditMemoLineId":{"type":"string","description":"The source credit memo line this line debits. See lines[].id on GET accounting/credit-memos/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit as it stood on the source credit memo line, in the debit memo currency."},"listPriceTotal":{"type":"string","format":"decimal","description":"The pre-discount line total, in the debit memo currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount from the source credit memo line, in the debit memo currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount as a percentage of the list price. A percentage, not an amount, so it has no currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency."},"amountDebited":{"type":"string","format":"decimal","description":"The amount debited for the line, in the debit memo currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount of the source credit memo line still available to debit, in the debit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"taxMode":{"type":"string","description":"How the line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code applied to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. See id on GET accounting/accounts/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the debit memo, each debiting one line of the source credit memo. An empty array when the debit memo has no lines. All line amounts are in the debit memo currency."}},"additionalProperties":false,"required":["id","debitMemoDate","debitMemoType","currency","customerId","entityId","paymentTerm","billToAddressId","soldToAddressId","lastModifiedDate"]},"description":"The debit memos on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchDebitMemoInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the debit memo with this identifier."},"debitMemoNumber":{"type":"string","description":"Limits results to the debit memo with this number, for example 'DM-1'. The match is exact."},"creditMemoId":{"type":"string","description":"Limits results to debit memos settling this credit memo. See id on GET accounting/credit-memos/:id."},"creditMemoNumber":{"type":"string","description":"Limits results to debit memos settling the credit memo with this number. The match is exact."},"customerId":{"type":"string","description":"Limits results to debit memos issued to this customer. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"Limits results to debit memos whose customer name contains this text. The match is case-insensitive."},"customerNumber":{"type":"string","description":"Limits results to debit memos with this customer number. The match is exact."},"entityId":{"type":"string","description":"Limits results to debit memos issued by this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to debit memos whose legal entity name contains this text. The match is case-insensitive."},"approvalStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to debit memos in any of these approval statuses. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Any other value matches no debit memo."},"debitMemoStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to debit memos in any of these coverage statuses. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'disputed'. Any other value matches no debit memo."},"debitMemoType":{"type":"array","items":{"type":"string"},"description":"Limits results to debit memos carrying any of these reason keys, for example 'orderEntryError'. The accepted keys are configured per tenant."},"currency":{"type":"string","description":"Limits results to debit memos in this currency. Format ISO 4217, for example 'USD'. The match is exact."},"paymentTerm":{"type":"string","description":"Limits results to debit memos with this payment-term key. The match is exact. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"Limits results to debit memos whose purchase-order reference contains this text. The match is case-insensitive."},"customerMessage":{"type":"string","description":"Limits results to debit memos whose customer message contains this text. The match is case-insensitive."},"externalDebitMemoId":{"type":"string","description":"Limits results to the debit memo with this external system identifier. The match is exact."},"isMigrated":{"type":"boolean","description":"Limits results by whether the debit memo was loaded from a previous system. Omit to return both."},"debitMemoDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to debit memos issued in this date range. Omit either bound to leave that side open."},"dueDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to debit memos falling due in this date range. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to debit memos last changed in this range. Omit either bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A debit memo must match every filter you send. Omit to return all debit memos."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of debit memos per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"searchRefundsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the refund."},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'."},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD."},"approvalStatus":{"type":"string","description":"The approval status. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency of the refund. Every amount on it is in this currency. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency."},"unappliedAmount":{"type":"string","format":"decimal","description":"The unapplied balance remaining on the source payment, in the refund currency."},"refundNote":{"type":"string","description":"A free-form note attached to the refund. Absent when none was set."},"customerId":{"type":"string","description":"The customer receiving the refund. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer receiving the refund."},"entityId":{"type":"string","description":"The legal entity issuing the refund. See id on GET base/entities."},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id."},"paymentNumber":{"type":"string","description":"The number of the source payment being refunded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"description":"The refunds that match, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","refundNumber":"REF-1042","refundDate":"2026-08-01","approvalStatus":"approved","refundType":"ach","currency":"USD","amount":"150.00","unappliedAmount":"0.00","customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","customerName":"Northwind Traders","entityId":"1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45","paymentId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","paymentNumber":"PMT-7781","lastModifiedDate":"2026-08-01T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchRefundsInput":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the refund with this identifier."},"status":{"type":"array","items":{"enum":["draft","pendingApproval","revise","approved","rejected"]},"description":"Limits results to refunds in any of these approval states. Omit or pass an empty array to return every state.","examples":[["pendingApproval","revise"]]},"paymentId":{"type":"string","description":"Limits results to refunds against this source payment. See id on GET accounting/payments/:id."},"customerId":{"type":"string","description":"Limits results to refunds for this customer. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"refundDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest refundDate to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest refundDate to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to refunds whose refundDate falls in this range. Both bounds are inclusive. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest change time to include, inclusive."},"end":{"type":"string","description":"The latest change time to include, inclusive."}},"additionalProperties":false,"description":"Limits results to refunds whose lastModifiedDate falls in this range, in UTC. Both bounds are inclusive. Omit either bound to leave that side open. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of refunds per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"rerunInvoiceRunOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice run retried. It is the same run, not a new one.","examples":["3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91"]},"status":{"type":"string","description":"The status the run settled at after the retry. Possible values: 'completed', 'error', 'completeAndError'. 'error' or 'completeAndError' means the retry hit the same problem, and the run can be rerun again once the cause is fixed.","examples":["completed"]},"invoicesCreated":{"type":"number","description":"The total number of invoices the run has created, including those from before the retry.","examples":[2]}},"additionalProperties":false,"required":["id","status","invoicesCreated"]},"rerunInvoiceRunInput":{"type":"object","properties":{},"additionalProperties":false},"approveRevenueContractOutput":{"type":"object","properties":{},"additionalProperties":false},"approveRevenueContractInput":{"type":"object","properties":{},"additionalProperties":false},"updateJournalEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the updated journal entry."}},"additionalProperties":false,"required":["id"]},"updateJournalEntryInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the journal entry."},"description":{"type":"string","description":"A free-form description of the journal entry."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Use format YYYY-MM-DD."},"reversalDate":{"type":"string","format":"date","description":"The reversal date recorded on the header. Use format YYYY-MM-DD."},"reversalReason":{"type":"string","description":"The reason recorded on the header for a later reversal. Accepted values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'. Any other value fails with INVALID_REVERSAL_REASON."},"reversalDescription":{"type":"string","description":"A free-form reversal description recorded on the header."},"url":{"type":"string","description":"A link to the source document this entry comes from."},"createJournalEntryLines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"transactionalCurrency":{"type":"string","description":"The currency of this line's amount. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"A free-form description of the line."},"intercompanyPartnerId":{"type":"string","description":"The intercompany counterparty for this line. Set on intercompany lines."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate from the line's transactionalCurrency to the entity's functional currency. It applies only when the two currencies differ. For a same-currency line it is 1 and any value you send is ignored."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a department record when dimensionCode is 'department'. It must be an existing, active record. For a custom dimension, send the value's modelUuid from listCustomDimensionValues, not its integer modelId."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for this new line, one per reporting dimension. Each tag pairs a dimensionCode with a modelId, and the referenced record must exist and be active. A line has at most one tag per dimensionCode. Omit or send an empty array for an untagged line."}},"additionalProperties":false,"required":["accountId","entityId","transactionalCurrency"]},"description":"The lines to add to the entry. Each is a new line with no id."},"updateJournalEntryLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The line to change. It must belong to this entry."},"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"intercompanyPartnerId":{"type":"string","description":"The intercompany counterparty for this line. Set on intercompany lines."},"description":{"type":"string","description":"A free-form description of the line."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"transactionalCurrency":{"type":"string","description":"The currency of this line's amount. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate from the line's transactionalCurrency to the entity's functional currency. It applies only when the two currencies differ. For a same-currency line it is 1 and any value you send is ignored."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a department record when dimensionCode is 'department'. It must be an existing, active record. For a custom dimension, send the value's modelUuid from listCustomDimensionValues, not its integer modelId."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for the line, one per reporting dimension. Each tag pairs a dimensionCode with a modelId referencing an existing, active record, at most one per dimensionCode. Omit to keep the current tags. Send an empty array to clear them. Send a list to replace them."}},"additionalProperties":false,"required":["id"]},"description":"The existing lines to change, each matched by its id. Only the fields you send on a line change."},"deleteJournalEntryLines":{"type":"array","items":{"type":"string"},"description":"The lines to delete from the entry, each by its id. Deleting a line also deletes its reporting tags."}},"additionalProperties":false},"accounting_journalEntries_createdPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"accounting_journalEntries_deletedPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"accounting_journalEntries_updatedPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"getPositionPermissionsOutput":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"},"description":"The uuids of the permission roles assigned to the position."},"taskUUIDs":{"type":"array","items":{"type":"string"},"description":"The uuids of the permission tasks assigned to the position."}},"additionalProperties":false,"required":["roleUUIDs","taskUUIDs"]},"uploadDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created document."}},"additionalProperties":false,"required":["id"]},"uploadDocumentInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The identifier of the employee the document belongs to. See id on GET people/person/:id."},"categoryId":{"type":"string","description":"The identifier of the document category to file the document under. See id on GET people/document-categories."},"fileName":{"type":"string","description":"The name of the file being uploaded, with its extension. Only the extension is kept, and the stored file name is generated from the category label and the employee's name."},"mimeType":{"type":"string","description":"The MIME type of the file, for example 'application/pdf'."},"contentBase64":{"type":"string","description":"The file's bytes, base64-encoded with the standard alphabet and padding. Must be non-empty and well-formed."},"expiryDate":{"type":"string","description":"The day the document expires. Use format YYYY-MM-DD. Omit for a document that does not expire."}},"additionalProperties":false,"required":["employeeId","categoryId","fileName","mimeType","contentBase64"]},"getTeamOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team."},"teamNumber":{"type":"string","description":"The system-generated team number. Absent while none has been assigned."},"name":{"type":"string","description":"The name of the team."},"teamType":{"enum":["hrTeam","psaTeam"],"description":"The type of the team."},"status":{"enum":["planned","active","inactive"],"description":"The status of the team, derived from its dates. 'planned' before the start date, 'active' between the dates, 'inactive' after the end date."},"startDate":{"type":"string","description":"The first day the team exists. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The last day the team exists. Format YYYY-MM-DD. Absent for a team with no planned end."},"employeeCount":{"type":"number","description":"The number of active members of the team."},"parentId":{"type":"string","description":"The identifier of the parent team. Absent for a top-level team. See id on GET people/teams/:id."},"parentName":{"type":"string","description":"The name of the parent team. Absent for a top-level team."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the team record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"applicationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the application."},"applicantNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated applicant number."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The applicant's display name."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The applicant's email address."},"personId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the person behind this application."},"recruitmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the recruitment applied to. See id on GET people/recruitments/:id."},"recruitmentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the recruitment applied to."},"positionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The position or job title the recruitment hires for."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the application. Possible values: 'draft', 'inProcess', 'waiting', 'accpeted', 'rejected', 'withdrawn', 'deleted', 'new', 'purged', 'anonymized'."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the application arrived. Possible values: 'appliedDirectly', 'sourcedInternally', 'sourcedExternally', 'employeeReferral', 'externalRecruiter'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the application record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"departmentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the department."},"departmentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated department number, for example '100010'. Absent while none has been assigned."},"departmentCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code for the department, for example 'IT', 'HR' or 'FIN'."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the parent department. Absent for a top-level department. See id on GET people/departments/:id."},"name":{"type":"string","description":"The display name of the department."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the department's purpose and responsibilities."},"managerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the department's managing employee. Absent when no manager is assigned."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The timeline status of the department. Possible values: 'planned', 'inactive', 'active', 'canceled'."},"employeeCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of employees in the department."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the department record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"assignPositionPermissionsOutput":{"type":"object","properties":{},"additionalProperties":false},"assignPositionPermissionsInput":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"},"description":"[fk: PermissionSearchApi.searchPermissionItems.permissions.uuid] The uuids of the permission roles to assign. Find them with searchPermissionItems and permissionType 'roles'."},"taskUUIDs":{"type":"array","items":{"type":"string"},"description":"[fk: PermissionSearchApi.searchPermissionItems.permissions.uuid] The uuids of the permission tasks to assign. Find them with searchPermissionItems and permissionType 'tasks'."}},"additionalProperties":false},"createTeamOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created team."}},"additionalProperties":false,"required":["id"]},"createTeamInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team. Must be unique across teams."},"teamType":{"enum":["hrTeam","psaTeam"],"description":"The type of the team. Defaults to 'hrTeam'."},"startDate":{"type":"string","description":"The first day the team exists. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The last day the team exists. Use format YYYY-MM-DD. Omit for a team with no planned end. It may not fall before startDate."},"parentId":{"type":"string","description":"The identifier of the parent team. Omit to create a top-level team. See id on GET people/teams/:id."}},"additionalProperties":false,"required":["name","startDate"]},"createApplicantOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created application."}},"additionalProperties":false,"required":["id"]},"createApplicantInput":{"type":"object","properties":{"person":{"type":"object","properties":{"firstName":{"type":"string","description":"The applicant's first name."},"lastName":{"type":"string","description":"The applicant's last name."},"email":{"type":"string","description":"The applicant's email address. If it already belongs to a person, that person is reused rather than created again."},"middleName":{"type":"string","description":"The applicant's middle name."},"phoneNumber":{"type":"string","description":"The applicant's phone number."}},"additionalProperties":false,"required":["firstName","lastName","email"],"description":"The personal details of the applicant."},"application":{"type":"object","properties":{"recruitmentId":{"type":"string","description":"The identifier of the recruitment being applied to. See id on GET people/recruitments/:id."},"source":{"enum":["appliedDirectly","sourcedInternally","sourcedExternally","employeeReferral","externalRecruiter"],"description":"How the application arrived. Omit to leave it unset."},"sourceDetails":{"type":"string","description":"Free-text detail about the source, for example the referring employee or the job board."},"expectedSalary":{"type":"string","description":"The applicant's salary expectation, as free text."},"linkedIn":{"type":"string","description":"The URL of the applicant's LinkedIn profile."},"shortIntroduction":{"type":"string","description":"A short free-text introduction or motivation supplied with the application."}},"additionalProperties":false,"required":["recruitmentId"],"description":"The application details."},"address":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"country":{"type":"string","description":"The country. Format ISO 3166-1 alpha-2, for example 'US'."},"stateProvince":{"type":"string","description":"The state or province, as the code the platform's state and province list uses, for example 'CA'. Not a spelled-out name."},"zipCode":{"type":"string","description":"The postal or ZIP code. Required whenever you send an address."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The applicant's home address. When you send it, line1, city, country and zipCode are all required."}},"additionalProperties":false,"required":["person","application"]},"createAbsenceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created absence."}},"additionalProperties":false,"required":["id"]},"createAbsenceInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee the absence belongs to. See id on GET people/person/:id."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Must not precede startDate."},"days":{"type":"string","format":"decimal","description":"The number of absence days. May be fractional for partial days."},"status":{"enum":["requested","approved","rejected","canceled"],"description":"The status to create the absence in. Defaults to 'requested', the only status that enters the approval workflow. Approve a requested absence with POST people/absences/approve. Supplying 'approved' or 'rejected' records the decision directly with no approver behind it, and 'canceled' passes through 'approved' first, firing that transition's side effects. Use the default unless you are importing absences already decided elsewhere."},"leaveDescription":{"type":"string","description":"A free-text reason for the absence."},"leaveCertificate":{"type":"string","description":"The certificate file content, for example a medical certificate for sick leave."},"certificateName":{"type":"string","description":"The file name of the certificate."},"googleEvent":{"type":"boolean","description":"Whether to mirror this absence to the linked Google Calendar."},"timezoneDiff":{"type":"string","description":"The time zone offset used for calendar synchronization."},"timezone":{"type":"string","description":"The time zone the absence dates are expressed in. Format IANA time-zone name, for example 'Europe/Berlin'."}},"additionalProperties":false,"required":["employeeId","absenceTypeId","startDate","endDate","days"]},"createPositionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created position."}},"additionalProperties":false,"required":["id"]},"createPositionInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the position."},"description":{"type":"string","description":"A free-form description of the position's responsibilities."},"desiredHeadcount":{"type":"number","description":"The target number of people to fill this position."},"expectedSalary":{"type":"number","description":"The expected annual salary for this position, in the entity's currency."},"startDate":{"type":"string","description":"The date the position becomes active. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the position becomes inactive. Use format YYYY-MM-DD. Omit for an open-ended position."},"overtimeStatus":{"enum":["EXEMPT","NON_EXEMPT"],"description":"The overtime eligibility of the position."},"hiringManagerId":{"type":"string","description":"The identifier of the employee who is the hiring manager. See id on GET people/person/:id."},"jobProfileId":{"type":"string","description":"The identifier of the job profile the position is associated with. There is no endpoint for it."},"regionId":{"type":"string","description":"The identifier of the region the position is based in. There is no endpoint for it."}},"additionalProperties":false,"required":["name"]},"approveAbsencesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the approved absences, in the same order as the input."}},"additionalProperties":false,"required":["ids"]},"approveAbsencesInput":{"type":"object","properties":{"absences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence to approve."}},"additionalProperties":false,"required":["id"]},"description":"The absences to approve."},"approverEmployeeId":{"type":"string","description":"The unique identifier for the employee performing the approval. Omit to let the platform infer it from the session. See id on GET people/person/:id."},"autoApprove":{"type":"boolean","description":"Whether to bypass the remaining approval steps. Defaults to false."}},"additionalProperties":false,"required":["absences"]},"getDepartmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the department."},"departmentNumber":{"type":"string","description":"The system-generated department number, for example '100010'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the department."},"departmentCode":{"type":"string","description":"The short code for the department, for example 'IT', 'HR' or 'FIN'."},"description":{"type":"string","description":"A free-form description of the department's purpose and responsibilities."},"managerId":{"type":"string","description":"The identifier of the managing employee. Absent when no manager is assigned. See id on GET people/person/:id."},"managerName":{"type":"string","description":"The full name of the managing employee. Absent when no manager is assigned."},"parentId":{"type":"string","description":"The identifier of the parent department. Absent for a top-level department. See id on GET people/departments/:id."},"parentName":{"type":"string","description":"The display name of the parent department. Absent for a top-level department."},"status":{"type":"string","description":"The timeline status of the department. Possible values: 'planned', 'inactive', 'active', 'canceled'."},"startDate":{"type":"string","description":"The date the department becomes active. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the department becomes inactive. Format YYYY-MM-DD. Absent for an open-ended department."},"employeeCount":{"type":"number","description":"The number of employees in the department."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the department record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteDepartmentId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The department's identifiers in other systems, one per configured field name. An empty array or absent when the department has none."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"searchPeopleOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the person."},"employeeNumber":{"type":"string","description":"The person's business number."},"firstName":{"type":"string","description":"The person's first name."},"lastName":{"type":"string","description":"The person's last name."},"middleName":{"type":"string","description":"The person's middle name."},"preferredFirstName":{"type":"string","description":"The person's preferred first name."},"preferredLastName":{"type":"string","description":"The person's preferred last name."},"name":{"type":"string","description":"The person's full name, in first-name-last-name order."},"email":{"type":"string","description":"The person's work email address."},"status":{"type":"string","description":"The current employment status of the person. Possible values: 'Active', 'Inactive', 'Planned', 'Cancelled'."},"employmentCategory":{"type":"string","description":"The employment category assigned to this person."},"startDate":{"type":"string","description":"The employment start date. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The employment end date. Format YYYY-MM-DD. Absent while the person is still employed."},"probationEndDate":{"type":"string","description":"The probation end date. Format YYYY-MM-DD. Absent when no probation period applies."},"jobId":{"type":"string","description":"The identifier of this person's active primary job. Absent when the person has no active primary job. There is no endpoint for it."},"departmentName":{"type":"string","description":"The name of the department this person belongs to. Absent when no department is assigned."},"positionName":{"type":"string","description":"The position or job title assigned to this person. Absent when no position is assigned."},"managerName":{"type":"string","description":"The full name of this person's primary manager. Absent when there is no active primary job or no manager assigned to it."},"compensation":{"type":"object","properties":{"amount":{"type":"object","properties":{"currency":{"type":"string","description":"The currency of the base salary. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The numeric value of the base salary, in the given currency."}},"additionalProperties":false,"description":"The base salary as a currency amount."},"paymentFrequency":{"type":"string","description":"The frequency at which this person is paid. Possible values: 'monthly', 'biweekly', 'weekly', 'yearly'."},"unit":{"type":"string","description":"The unit the base salary is measured in. Possible values: 'annually', 'quarterly', 'monthly', 'semiMonthly', 'weekly', 'biWeekly', 'daily', 'hourly', 'fixed'."},"monthlyAmount":{"type":"object","properties":{"currency":{"type":"string","description":"The currency of the monthly-equivalent salary. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The numeric value of the monthly-equivalent salary, in the given currency."}},"additionalProperties":false,"description":"The base salary converted to a monthly amount. Only the 'annually' and 'hourly' units are converted. For every other unit this repeats the base salary unchanged and is not a monthly figure."},"salaryType":{"type":"string","description":"The name of the compensation type. Absent when none is assigned."},"salaryCode":{"type":"string","description":"The code of the compensation type. Absent when the type has no code or none is assigned."},"startDate":{"type":"string","description":"The date from which this compensation record is effective. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date on which this compensation record expires. Format YYYY-MM-DD. Absent when it is open-ended."}},"additionalProperties":false,"description":"The person's current active compensation record. Absent when no compensation record exists."},"entityName":{"type":"string","description":"The name of the legal entity this person belongs to."},"locationName":{"type":"string","description":"The name of this person's work location. Absent when none is assigned."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"The person's custom field values, as key-value pairs of field name and value."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the person record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It is the fieldName of an existing employee external-identifier configuration."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers owned by other systems, at most one per fieldName. Absent when the person has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The people that match this page of the search. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPeopleInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"firstName":{"type":"string","description":"Limits results to people with this first name."},"lastName":{"type":"string","description":"Limits results to people with this last name."},"name":{"type":"string","description":"Limits results to people with this full name."},"email":{"type":"string","description":"Limits results to people with this work email address."},"employeeNumber":{"type":"string","description":"Limits results to the person with this business number. The match is exact."},"entityName":{"type":"string","description":"Limits results to people in the legal entity with this name. The match is exact."},"status":{"type":"string","description":"Limits results to people with this employment status. Accepted values: 'Active', 'Inactive', 'Planned', 'Cancelled'. Any other value matches no person."},"employmentCategory":{"type":"string","description":"Limits results to people with this employment category."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It must be the fieldName of an existing employee external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system holds it. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to people with this external identifier. Both fieldName and value are required. Several people may share a value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. A person must match every filter you send."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The maximum number of people per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"createPersonOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created person."}},"additionalProperties":false,"required":["id"]},"createPersonInput":{"type":"object","properties":{"person":{"type":"object","properties":{"firstName":{"type":"string","description":"The person's first name."},"lastName":{"type":"string","description":"The person's last name."},"email":{"type":"string","description":"The person's work email address."},"startDate":{"type":"string","description":"The employment start date. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The employment end date. Use format YYYY-MM-DD."},"middleName":{"type":"string","description":"The person's middle name."},"gender":{"type":"string","description":"The person's self-identified gender. Any string value is accepted."},"dateOfBirth":{"type":"string","description":"The person's date of birth. Use format YYYY-MM-DD."},"nationality":{"type":"string","description":"The person's nationality. Format ISO 3166-1 alpha-2, for example 'US'."}},"additionalProperties":false,"required":["firstName","lastName","email","startDate"],"description":"The person's personal details."},"employee":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier of the legal entity this person belongs to. See id on GET base/entities."},"personalEmail":{"type":"string","description":"The person's personal email address."},"employmentCategory":{"type":"string","description":"The person's employment category."},"holidayCalendarId":{"type":"string","description":"The identifier of the holiday calendar. Required when absencePolicies is provided. There is no endpoint for it."}},"additionalProperties":false,"required":["entityId"],"description":"The person's employment details."},"job":{"type":"object","properties":{"departmentId":{"type":"string","description":"The identifier of the department. See id on GET people/departments/:id."},"positionId":{"type":"string","description":"The identifier of the position. See id on GET people/positions/:id."},"jobManagerId":{"type":"string","description":"The identifier of the manager's job assignment, which is the manager's job id and not their person id. There is no endpoint for it."}},"additionalProperties":false,"required":["departmentId"],"description":"The person's job assignment details."},"address":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"country":{"type":"string","description":"The country. Format ISO 3166-1 alpha-2, for example 'US'."},"stateProvince":{"type":"string","description":"The state, province or region."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The person's home address."},"absencePolicies":{"type":"array","items":{"type":"object","properties":{"absencePolicyId":{"type":"string","description":"The identifier of the absence policy. There is no endpoint for it."}},"additionalProperties":false,"required":["absencePolicyId"]},"description":"The absence policies assigned to the person."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It must be the fieldName of an existing employee external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers owned by other systems, as the whole initial set. At most one entry per fieldName. Two entries with the same fieldName fail with DUPLICATE_EXTERNAL_IDENTIFIER, and a fieldName with no configuration fails with UNKNOWN_EXTERNAL_IDENTIFIER, which lists every unrecognized key."}},"additionalProperties":false,"required":["person","employee","job"]},"absencesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence."},"leaveNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The absence number."},"employeeId":{"type":"string","description":"The employee the absence belongs to. See id on GET people/person/:id."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"days":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The number of absence days. May be fractional for partial days."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the absence. Possible values: 'requested', 'approved', 'rejected', 'canceled'."},"leaveDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason for the absence."}},"additionalProperties":false},"updatePersonOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePersonInput":{"type":"object","properties":{"firstName":{"type":"string","description":"The person's first name. Changing first or last name recomputes the display name."},"lastName":{"type":"string","description":"The person's last name. Changing first or last name recomputes the display name."},"middleName":{"type":"string","description":"The person's middle name."},"email":{"type":"string","description":"The person's work email address. It is stored in lowercase."},"personalEmail":{"type":"string","description":"The person's personal email address. It is stored in lowercase."},"gender":{"type":"string","description":"The person's self-identified gender. Any string value is accepted."},"dateOfBirth":{"type":"string","description":"The person's date of birth. Use format YYYY-MM-DD."},"nationality":{"type":"string","description":"The person's nationality. Format ISO 3166-1 alpha-2, for example 'US'."},"startDate":{"type":"string","description":"The employment start date. Use format YYYY-MM-DD. It must not overlap the person's other employee profiles. Changing it also re-anchors incomplete boarding deadlines and, for future-dated employments, absence policy assignments and the first job's start."},"endDate":{"type":"string","description":"The employment end date. Use format YYYY-MM-DD. It cannot be cleared through this endpoint. Setting it on a previously open-ended employment also end-dates the person's active jobs and open absence policy assignments to the same date."},"employmentCategory":{"type":"string","description":"The person's employment category."},"address":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"country":{"type":"string","description":"The country. Format ISO 3166-1 alpha-2, for example 'US'."},"stateProvince":{"type":"string","description":"The state, province or region."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The person's home address. When present it replaces the whole address, not a per-field patch."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It must be the fieldName of an existing employee external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers to add. A fieldName already present on the record fails with DUPLICATE_EXTERNAL_IDENTIFIER, because adding a duplicate key is not an implicit update."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier already present on the record."},"value":{"type":"string","description":"The new identifier value."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers to rewrite, matched by fieldName. A fieldName not already present fails with EXTERNAL_IDENTIFIER_NOT_FOUND, because rewriting is not an implicit create."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove. A fieldName not present on the record fails with EXTERNAL_IDENTIFIER_NOT_FOUND. Omit all three external-identifier arrays to leave the set unchanged, since deletion is always explicit."}},"additionalProperties":false},"updateDepartmentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateDepartmentInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the department."},"departmentCode":{"type":"string","description":"The short code for the department. Must be unique across departments. Send an empty string to reset it to the system-generated department number."},"description":{"type":"string","description":"A free-form description of the department's purpose and responsibilities."},"managerId":{"type":"string","description":"The identifier of the employee who manages the department. See id on GET people/person/:id."},"parentId":{"type":"string","description":"The identifier of the new parent department. It cannot be cleared through this endpoint, and it must not be a descendant of this department. See id on GET people/departments/:id."},"startDate":{"type":"string","description":"The date the department becomes active. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the department becomes inactive. Use format YYYY-MM-DD. It cannot be cleared through this endpoint."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteDepartmentId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. A fieldName already present on the record fails with DUPLICATE_EXTERNAL_IDENTIFIER."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of an identifier already present on the record."},"value":{"type":"string","description":"The new identifier value in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to rewrite, matched by fieldName. A fieldName not present on the record fails with EXTERNAL_IDENTIFIER_NOT_FOUND."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The field names of external identifiers to remove. A fieldName not present on the record fails with EXTERNAL_IDENTIFIER_NOT_FOUND. Removal is always explicit, never by omission."}},"additionalProperties":false},"downloadDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the document the link points at."},"fileName":{"type":"string","description":"The stored file name of the document. Save the downloaded bytes under it."},"mimeType":{"type":"string","description":"The MIME type of the stored file. Absent when storage does not report one."},"fileSizeBytes":{"type":"number","description":"The size of the stored file in bytes. Absent when storage does not report one."},"downloadUrl":{"type":"string","description":"A short-lived pre-signed URL the file's bytes are fetched from. It expires and is not a stable link."}},"additionalProperties":false,"required":["id","fileName","downloadUrl"]},"updatePositionOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePositionInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the position."},"description":{"type":"string","description":"A free-form description of the position's responsibilities."},"desiredHeadcount":{"type":"number","description":"The target number of people to fill this position."},"expectedSalary":{"type":"number","description":"The expected annual salary for this position, in the entity's currency."},"startDate":{"type":"string","description":"The date the position becomes active. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the position becomes inactive. Use format YYYY-MM-DD. It cannot be cleared through this endpoint."},"overtimeStatus":{"enum":["EXEMPT","NON_EXEMPT"],"description":"The overtime eligibility of the position."},"hiringManagerId":{"type":"string","description":"The identifier of the employee who is the hiring manager. See id on GET people/person/:id."},"jobProfileId":{"type":"string","description":"The identifier of the job profile the position is associated with. There is no endpoint for it."},"regionId":{"type":"string","description":"The identifier of the region the position is based in. There is no endpoint for it."}},"additionalProperties":false},"documentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the document."},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated document number."},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the employee the document belongs to. Absent when the linked employee no longer resolves. See id on GET people/person/:id."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the document category the document is filed under. Absent when the linked category no longer resolves. See id on GET people/document-categories."},"categoryLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display label of the document category the document is filed under. See label on GET people/document-categories."},"fileName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The stored file name, generated on upload from the category label and the employee's name."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The current status of the document. Possible values: 'pending', 'approved', 'rejected', 'deprecated', 'readyToDownload', 'downloaded'."},"expiryDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The day the document expires, projected as UTC midnight of that day. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent when the document does not expire."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the document record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteTeamOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team the call acted on."},"name":{"type":"string","description":"The name of the team."},"outcome":{"enum":["deleted","deactivated"],"description":"What happened to the team. 'deleted' when it was removed. 'deactivated' when something still depends on it, so its end date was set to the date of the request instead."},"reason":{"type":"string","description":"Why the team was deactivated rather than deleted. Absent when outcome is 'deleted'."}},"additionalProperties":false,"required":["id","name","outcome"]},"searchAbsencesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence."},"leaveNumber":{"type":"string","description":"The absence number."},"employeeId":{"type":"string","description":"The employee the absence belongs to. See id on GET people/person/:id."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"days":{"type":"string","format":"decimal","description":"The number of absence days. May be fractional for partial days."},"status":{"enum":["requested","approved","rejected","canceled"],"description":"The status of the absence."},"leaveDescription":{"type":"string","description":"The reason for the absence."}},"additionalProperties":false,"required":["id","employeeId","absenceTypeId","startDate","endDate"]},"description":"The absences on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more absences remain after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAbsencesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"employeeId":{"type":"string","description":"Limits results to absences for this employee."},"absenceTypeId":{"type":"string","description":"Limits results to absences of this absence type."},"status":{"enum":["requested","approved","rejected","canceled"],"description":"Limits results to absences with this status."},"startsAfter":{"type":"string","format":"date-time","description":"Limits results to absences whose startDate is on or after this value, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endsBefore":{"type":"string","format":"date-time","description":"Limits results to absences whose endDate is on or before this value, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"descriptionContains":{"type":"string","description":"Limits results to absences whose description contains this text. The match is case-insensitive."}},"additionalProperties":false,"description":"The filters to apply. An absence must match every filter you send. Omit to return all absences."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of absences per page, at most 100. Defaults to 25. A value above 100 is treated as 100, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"getPositionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position."},"positionNumber":{"type":"string","description":"The system-generated position number, for example 'POS-100010'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the position."},"description":{"type":"string","description":"A free-form description of the position's responsibilities. Absent when none is set."},"desiredHeadcount":{"type":"number","description":"The target number of people to fill this position."},"employeeCount":{"type":"number","description":"The number of employees currently in this position."},"expectedSalary":{"type":"number","description":"The expected annual salary for this position, in the entity's currency."},"overtimeStatus":{"type":"string","description":"The overtime eligibility of the position. Possible values: 'EXEMPT', 'NON_EXEMPT'."},"status":{"type":"string","description":"The fill status of the position. Possible values: 'unfilled', 'partiallyFilled', 'filled', 'overfilled', 'inactive'."},"timelineStatus":{"type":"string","description":"The timeline status of the position. Possible values: 'planned', 'inactive', 'active', 'canceled'."},"startDate":{"type":"string","description":"The date the position becomes active. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the position becomes inactive. Format YYYY-MM-DD. Absent for an open-ended position."},"hiringManagerId":{"type":"string","description":"The identifier of the hiring manager. Absent when none is assigned. See id on GET people/person/:id."},"hiringManagerName":{"type":"string","description":"The full name of the hiring manager. Absent when none is assigned."},"jobProfileId":{"type":"string","description":"The identifier of the associated job profile. Absent when none is assigned. There is no endpoint for it."},"jobProfileName":{"type":"string","description":"The name of the associated job profile. Absent when none is assigned."},"regionId":{"type":"string","description":"The identifier of the region the position is based in. Absent when none is assigned. There is no endpoint for it."},"regionName":{"type":"string","description":"The name of the region the position is based in. Absent when none is assigned."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the position record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"createDepartmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created department."}},"additionalProperties":false,"required":["id"]},"createDepartmentInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the department."},"departmentCode":{"type":"string","description":"A short code for the department, for example 'IT', 'HR' or 'FIN'. Must be unique across departments. When omitted, the system-generated department number is used as the code."},"description":{"type":"string","description":"A free-form description of the department's purpose and responsibilities."},"managerId":{"type":"string","description":"The identifier of the employee who manages the department. See id on GET people/person/:id."},"parentId":{"type":"string","description":"The identifier of the parent department. Omit for a top-level department. See id on GET people/departments/:id."},"startDate":{"type":"string","description":"The date the department becomes active. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the department becomes inactive. Use format YYYY-MM-DD. Omit for an open-ended department."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteDepartmentId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The department's identifiers in other systems, one per configured field name. A field name not configured for your tenant fails with UNKNOWN_EXTERNAL_IDENTIFIER."}},"additionalProperties":false,"required":["name","startDate"]},"updateAbsenceOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAbsenceInput":{"type":"object","properties":{"editReason":{"type":"string","description":"The reason for the edit. The reason is recorded on the absence's history. If it contains the text 'sick certificate', only leaveCertificate and certificateName are written and every other field in the request is ignored."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"days":{"type":"string","format":"decimal","description":"The number of absence days. May be fractional for partial days."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"leaveDescription":{"type":"string","description":"A free-text reason for the absence."},"googleEvent":{"type":"boolean","description":"Whether to mirror this absence to the linked Google Calendar."},"leaveCertificate":{"type":"string","description":"The certificate file content. The certificate is written only when editReason contains the text 'sick certificate'. Sent without that text, it is ignored."},"certificateName":{"type":"string","description":"The file name of the certificate. Written only when editReason contains the text 'sick certificate', like leaveCertificate."}},"additionalProperties":false,"required":["editReason"]},"recruitmentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the recruitment."},"recruitmentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated recruitment number. Absent while none has been assigned."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the opening."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-text category of the opening, for example internal, external or student."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the opening, derived from the deadline. 'inactive' once the deadline has passed, 'active' otherwise, including when no deadline is set."},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the opening is published externally. It is set by the external-publishing flow, not through this API."},"unsolicited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this is the catch-all opening that unsolicited applications are filed against."},"deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The application deadline, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent when no deadline is set."},"vacancies":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of vacant positions the opening covers."},"departmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the department the opening belongs to. Absent when not set. See id on GET people/departments/:id."},"departmentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the department. Absent when not set."},"positionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the position being recruited for. Absent when not set. See id on GET people/positions/:id."},"positionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the position. Absent when not set."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the team. Absent when none is assigned. See id on GET people/teams/:id."},"teamName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the team. Absent when none is assigned."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the work location. Absent when none is assigned. There is no endpoint for it."},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the work location. Absent when none is assigned."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that will employ the hire. Absent when none is assigned."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that will employ the hire. Absent when none is assigned."},"employmentCategoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the employment category. Absent when none is assigned. There is no endpoint for it."},"hiringManagerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the hiring manager. Absent when none is assigned. See id on GET people/person/:id."},"hiringManagerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the hiring manager. Absent when none is assigned."},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the recruitment owner, the recruiter. Absent when none is assigned. See id on GET people/person/:id."},"ownerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the recruitment owner. Absent when none is assigned."},"jobDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The job description, as plain text."},"viabilityCriteria":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The internal viability criteria used to screen applicants, as plain text."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The URL of the posting or the hiring team's page."},"relocationRequired":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whether and how relocation is required. Free text, not a boolean."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the recruitment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"positionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position."},"positionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated position number, for example 'POS-100010'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the position."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the position's responsibilities. Absent when none is set."},"desiredHeadcount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The target number of people to fill this position."},"employeeCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of employees currently in this position."},"expectedSalary":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The expected annual salary for this position, in the entity's currency."},"hiringManagerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the hiring manager. Absent when none is assigned."},"overtimeStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The overtime eligibility of the position. Possible values: 'EXEMPT', 'NON_EXEMPT'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fill status of the position. Possible values: 'unfilled', 'partiallyFilled', 'filled', 'overfilled', 'inactive'."},"timelineStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The timeline status of the position. Possible values: 'planned', 'inactive', 'active', 'canceled'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the position record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getPersonOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the person."},"employeeNumber":{"type":"string","description":"The person's business number."},"firstName":{"type":"string","description":"The person's first name."},"lastName":{"type":"string","description":"The person's last name."},"middleName":{"type":"string","description":"The person's middle name."},"preferredFirstName":{"type":"string","description":"The person's preferred first name."},"preferredLastName":{"type":"string","description":"The person's preferred last name."},"name":{"type":"string","description":"The person's full name, in first-name-last-name order."},"email":{"type":"string","description":"The person's work email address."},"status":{"type":"string","description":"The current employment status of the person. Possible values: 'Active', 'Inactive', 'Planned', 'Cancelled'."},"employmentCategory":{"type":"string","description":"The employment category assigned to this person."},"startDate":{"type":"string","description":"The employment start date. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The employment end date. Format YYYY-MM-DD. Absent while the person is still employed."},"probationEndDate":{"type":"string","description":"The probation end date. Format YYYY-MM-DD. Absent when no probation period applies."},"jobId":{"type":"string","description":"The identifier of this person's active primary job. Absent when the person has no active primary job. There is no endpoint for it."},"departmentName":{"type":"string","description":"The name of the department this person belongs to. Absent when no department is assigned."},"positionName":{"type":"string","description":"The position or job title assigned to this person. Absent when no position is assigned."},"managerName":{"type":"string","description":"The full name of this person's primary manager. Absent when there is no active primary job or no manager assigned to it."},"compensation":{"type":"object","properties":{"amount":{"type":"object","properties":{"currency":{"type":"string","description":"The currency of the base salary. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The numeric value of the base salary, in the given currency."}},"additionalProperties":false,"description":"The base salary as a currency amount."},"paymentFrequency":{"type":"string","description":"The frequency at which this person is paid. Possible values: 'monthly', 'biweekly', 'weekly', 'yearly'."},"unit":{"type":"string","description":"The unit the base salary is measured in. Possible values: 'annually', 'quarterly', 'monthly', 'semiMonthly', 'weekly', 'biWeekly', 'daily', 'hourly', 'fixed'."},"monthlyAmount":{"type":"object","properties":{"currency":{"type":"string","description":"The currency of the monthly-equivalent salary. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The numeric value of the monthly-equivalent salary, in the given currency."}},"additionalProperties":false,"description":"The base salary converted to a monthly amount. Only the 'annually' and 'hourly' units are converted. For every other unit this repeats the base salary unchanged and is not a monthly figure."},"salaryType":{"type":"string","description":"The name of the compensation type. Absent when none is assigned."},"salaryCode":{"type":"string","description":"The code of the compensation type. Absent when the type has no code or none is assigned."},"startDate":{"type":"string","description":"The date from which this compensation record is effective. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date on which this compensation record expires. Format YYYY-MM-DD. Absent when it is open-ended."}},"additionalProperties":false,"description":"The person's current active compensation record. Absent when no compensation record exists."},"entityName":{"type":"string","description":"The name of the legal entity this person belongs to."},"locationName":{"type":"string","description":"The name of this person's work location. Absent when none is assigned."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"The person's custom field values, as key-value pairs of field name and value."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the person record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It is the fieldName of an existing employee external-identifier configuration."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers owned by other systems, at most one per fieldName. Absent when the person has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"deleteDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted document."},"fileName":{"type":"string","description":"The stored file name the deleted document had."}},"additionalProperties":false,"required":["id","fileName"]},"rejectAbsencesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the rejected absences, in the same order as the input."}},"additionalProperties":false,"required":["ids"]},"rejectAbsencesInput":{"type":"object","properties":{"absences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence to reject."}},"additionalProperties":false,"required":["id"]},"description":"The absences to reject."},"approverEmployeeId":{"type":"string","description":"The unique identifier for the employee performing the rejection. Omit to let the platform infer it from the session. See id on GET people/person/:id."}},"additionalProperties":false,"required":["absences"]},"createApplicationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created application."},"applicantNumber":{"type":"string","description":"The system-generated applicant number. Absent while none has been assigned."},"personId":{"type":"string","description":"The identifier of the person the application belongs to."},"recruitmentId":{"type":"string","description":"The identifier of the recruitment applied to. See id on GET people/recruitments/:id."},"status":{"type":"string","description":"The status the application is created in, always 'new'."}},"additionalProperties":false,"required":["id","personId","recruitmentId","status"]},"createApplicationInput":{"type":"object","properties":{"personId":{"type":"string","description":"The identifier of the person who applies."},"recruitmentId":{"type":"string","description":"The identifier of the recruitment being applied to. See id on GET people/recruitments/:id."},"source":{"enum":["appliedDirectly","sourcedInternally","sourcedExternally","employeeReferral","externalRecruiter"],"description":"How the application arrived. When omitted, no source is recorded."},"sourceDetails":{"type":"string","description":"Free-text detail about the source, for example the referring employee or the job board."},"expectedSalary":{"type":"string","description":"The applicant's salary expectation, as free text."},"linkedIn":{"type":"string","description":"The URL of the applicant's LinkedIn profile."},"shortIntroduction":{"type":"string","description":"A short free-text introduction or motivation supplied with the application."}},"additionalProperties":false,"required":["personId","recruitmentId"]},"peopleRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the person."},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's business number."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's first name."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's last name."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's full name, in first-name-last-name order."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name the person goes by: their preferred first and last name where set, otherwise their legal name. Returned only — it can be neither filtered nor sorted on."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's work email address."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The current employment status of the person. Possible values: 'Active', 'Inactive', 'Planned', 'Cancelled'."},"employmentCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employment category assigned to this person."},"weeklyWorkingHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The person's standard working hours per week, for example 40 for full time. A number of hours, not an amount."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity the person is employed by."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this person belongs to."},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of this person's work location."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the person record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getRecruitmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the recruitment."},"recruitmentNumber":{"type":"string","description":"The system-generated recruitment number. Absent while none has been assigned."},"name":{"type":"string","description":"The name of the opening."},"category":{"type":"string","description":"A free-text category of the opening, for example internal, external or student."},"status":{"enum":["active","inactive"],"description":"The status of the opening, derived from the deadline. 'inactive' once the deadline has passed, 'active' otherwise, including when no deadline is set."},"published":{"type":"boolean","description":"Whether the opening is published externally. It is set by the external-publishing flow, not through this API."},"unsolicited":{"type":"boolean","description":"Whether this is the catch-all opening that unsolicited applications are filed against."},"deadline":{"type":"string","description":"The application deadline. Format YYYY-MM-DD. Absent when no deadline is set."},"vacancies":{"type":"number","description":"The number of vacant positions the opening covers."},"departmentId":{"type":"string","description":"The identifier of the department the opening belongs to. Absent when not set. See id on GET people/departments/:id."},"departmentName":{"type":"string","description":"The name of the department. Absent when not set."},"positionId":{"type":"string","description":"The identifier of the position being recruited for. Absent when not set. See id on GET people/positions/:id."},"positionName":{"type":"string","description":"The name of the position. Absent when not set."},"teamId":{"type":"string","description":"The identifier of the team. Absent when none is assigned. See id on GET people/teams/:id."},"teamName":{"type":"string","description":"The name of the team. Absent when none is assigned."},"locationId":{"type":"string","description":"The identifier of the work location. Absent when none is assigned. There is no endpoint for it."},"locationName":{"type":"string","description":"The name of the work location. Absent when none is assigned."},"entityId":{"type":"string","description":"The legal entity that will employ the hire. Absent when none is assigned."},"entityName":{"type":"string","description":"The name of the legal entity that will employ the hire. Absent when none is assigned."},"employmentCategoryId":{"type":"string","description":"The identifier of the employment category. Absent when none is assigned. There is no endpoint for it."},"hiringManagerId":{"type":"string","description":"The identifier of the hiring manager. Absent when none is assigned. See id on GET people/person/:id."},"hiringManagerName":{"type":"string","description":"The full name of the hiring manager. Absent when none is assigned."},"ownerId":{"type":"string","description":"The identifier of the recruitment owner, the recruiter. Absent when none is assigned. See id on GET people/person/:id."},"ownerName":{"type":"string","description":"The full name of the recruitment owner. Absent when none is assigned."},"jobDescription":{"type":"string","description":"The job description, as plain text."},"viabilityCriteria":{"type":"string","description":"The internal viability criteria used to screen applicants, as plain text."},"website":{"type":"string","description":"The URL of the posting or the hiring team's page."},"relocationRequired":{"type":"string","description":"Whether and how relocation is required. Free text, not a boolean."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the recruitment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"removePositionPermissionsOutput":{"type":"object","properties":{},"additionalProperties":false},"removePositionPermissionsInput":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"},"description":"[fk: PositionGetPermissionsEndpointV1.getPositionPermissions.roleUUIDs] The uuids of the permission roles to remove."},"taskUUIDs":{"type":"array","items":{"type":"string"},"description":"[fk: PositionGetPermissionsEndpointV1.getPositionPermissions.taskUUIDs] The uuids of the permission tasks to remove."}},"additionalProperties":false},"getAbsenceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence."},"leaveNumber":{"type":"string","description":"The absence number."},"employeeId":{"type":"string","description":"The employee the absence belongs to. See id on GET people/person/:id."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"days":{"type":"string","format":"decimal","description":"The number of absence days. May be fractional for partial days."},"status":{"enum":["requested","approved","rejected","canceled"],"description":"The status of the absence."},"leaveDescription":{"type":"string","description":"The reason for the absence."}},"additionalProperties":false,"required":["id","employeeId","absenceTypeId","startDate","endDate"]},"updateRecruitmentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateRecruitmentInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the opening."},"category":{"type":"string","description":"A free-text category of the opening, for example internal, external or student."},"deadline":{"type":"string","description":"The application deadline. Use format YYYY-MM-DD. The status is derived from it."},"vacancies":{"type":"number","description":"The number of vacant positions the opening covers, from 0 to 1000."},"departmentId":{"type":"string","description":"The identifier of the department to move the opening to. See id on GET people/departments/:id."},"positionId":{"type":"string","description":"The identifier of the position to recruit for. See id on GET people/positions/:id."},"teamId":{"type":"string","description":"The identifier of the team. See id on GET people/teams/:id."},"locationId":{"type":"string","description":"The identifier of the work location. There is no endpoint for it."},"entityId":{"type":"string","description":"The legal entity that will employ the hire."},"employmentCategoryId":{"type":"string","description":"The identifier of the employment category. There is no endpoint for it."},"hiringManagerId":{"type":"string","description":"The identifier of the employee to make hiring manager. They are granted the permissions to work the opening. See id on GET people/person/:id."},"ownerId":{"type":"string","description":"The identifier of the employee to make recruitment owner, the recruiter. They are granted the permissions to work the opening. See id on GET people/person/:id."},"jobDescription":{"type":"string","description":"The job description, as plain text. Changing it does not re-score applicants already in the pipeline."},"viabilityCriteria":{"type":"string","description":"The internal viability criteria used to screen applicants, as plain text. Changing it does not re-score applicants already in the pipeline."},"website":{"type":"string","description":"The URL of the posting or the hiring team's page."},"relocationRequired":{"type":"string","description":"Whether and how relocation is required. Free text, not a boolean."}},"additionalProperties":false},"getAbsenceTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence type."},"name":{"type":"string","description":"The name of the absence type."},"category":{"enum":["sickLeave","vacation","other","overtime"],"description":"The category the absence type belongs to."},"description":{"type":"string","description":"A description of the absence type."}},"additionalProperties":false,"required":["id","name","category"]},"updateTeamOutput":{"type":"object","properties":{},"additionalProperties":false},"updateTeamInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team."},"teamType":{"enum":["hrTeam","psaTeam"],"description":"The type of the team."},"startDate":{"type":"string","description":"The first day the team exists. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The last day the team exists. Use format YYYY-MM-DD. It may not fall before the team's start date, whether you change that start date in the same request or it is already stored."},"parentId":{"type":"string","description":"The identifier of the team to move this one under. It may not be the team itself or one of its descendants. See id on GET people/teams/:id."}},"additionalProperties":false},"absenceTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence type."},"name":{"type":"string","description":"The name of the absence type."},"category":{"type":"string","description":"The category the absence type belongs to. Possible values: 'sickLeave', 'vacation', 'other', 'overtime'."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the absence type."}},"additionalProperties":false},"deleteAbsenceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted absence."}},"additionalProperties":false,"required":["id"]},"createRecruitmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created recruitment."}},"additionalProperties":false,"required":["id"]},"createRecruitmentInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the opening. When omitted, it is derived from the department or position name."},"category":{"type":"string","description":"A free-text category of the opening, for example internal, external or student."},"deadline":{"type":"string","description":"The application deadline. Use format YYYY-MM-DD. The status is derived from it."},"vacancies":{"type":"number","description":"The number of vacant positions the opening covers, from 0 to 1000."},"departmentId":{"type":"string","description":"The identifier of the department the opening belongs to. Required unless positionId is given. See id on GET people/departments/:id."},"positionId":{"type":"string","description":"The identifier of the position being recruited for. Required unless departmentId is given. See id on GET people/positions/:id."},"teamId":{"type":"string","description":"The identifier of the team. See id on GET people/teams/:id."},"locationId":{"type":"string","description":"The identifier of the work location. There is no endpoint for it."},"entityId":{"type":"string","description":"The legal entity that will employ the hire."},"employmentCategoryId":{"type":"string","description":"The identifier of the employment category. There is no endpoint for it."},"hiringManagerId":{"type":"string","description":"The identifier of the employee who is the hiring manager. They are granted the permissions to work the opening. See id on GET people/person/:id."},"ownerId":{"type":"string","description":"The identifier of the employee who owns the recruitment, the recruiter. They are granted the permissions to work the opening. See id on GET people/person/:id."},"jobDescription":{"type":"string","description":"The job description, as plain text."},"viabilityCriteria":{"type":"string","description":"The internal viability criteria used to screen applicants, as plain text. Stored as an empty string when omitted."},"website":{"type":"string","description":"The URL of the posting or the hiring team's page."},"relocationRequired":{"type":"string","description":"Whether and how relocation is required. Free text, not a boolean."}},"additionalProperties":false},"teamsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team."},"teamNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated team number. Absent while none has been assigned."},"name":{"type":"string","description":"The name of the team."},"teamType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of the team. Possible values: 'hrTeam', 'psaTeam'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the team, derived from its dates. 'planned' before the start date, 'active' between the dates, 'inactive' after the end date."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day the team exists. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day the team exists. Format YYYY-MM-DD. Absent for a team with no planned end."},"employeeCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of active members of the team."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the parent team. Absent for a top-level team. See id on GET people/teams/:id."},"parentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the parent team. Absent for a top-level team."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the team record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"hr_people_createdPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"hr_people_updatedPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"listPerformanceObligationProductsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this product mapping."},"productId":{"type":"string","description":"The mapped product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product."},"productName":{"type":"string","description":"The name of that product."},"entityBookId":{"type":"string","description":"The entity book this mapping applies in. A product mapped in several entity books has one entry per book. See id on GET accounting/books/:bookId/entity-assignments."},"entityName":{"type":"string","description":"The name of the legal entity of that entity book."},"bookName":{"type":"string","description":"The name of the accounting book of that entity book."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this mapping applies. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this mapping applies. Format YYYY-MM-DD. Absent when the mapping is open-ended."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this mapping last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["effectiveStartDate","lastModifiedDate"]},"description":"The obligation's product mappings on this page, newest first. An empty array when the obligation maps no products."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more mappings remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"taxConfigurationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax configuration."},"entityId":{"type":"string","description":"The legal entity this configuration belongs to. An entity has at most one tax configuration. See id on GET base/entities."},"status":{"type":"string","description":"The status of the tax configuration. The tax codes of an inactive configuration are not offered on documents. Possible values: 'Active', 'Inactive'."},"taxRegime":{"type":"string","description":"The tax system that determines which tax components are valid. Possible values: 'EU_VAT', 'India_GST', 'Canada_GST', 'Ghana_VAT', 'SingleRate_GST', 'Mexico_IVA'."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the tax configuration record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"landedCostsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The landed cost number, for example 'LC-1007'.","examples":["LC-1007"]},"documentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the landed cost. Possible values: 'DRAFT', 'COMMITTED'.","examples":["DRAFT"]},"documentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the landed cost. Format: YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["7039b992-696a-40c7-a181-51759304ef83"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity in `entityId`.","examples":["Flow UK"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the landed cost.","examples":["Sea freight on the August container"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the landed cost is active.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the landed cost was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:02:11.004Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the landed cost last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"voidCreditCardEntryOutput":{"type":"object","properties":{},"additionalProperties":false},"voidCreditCardEntryInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the entry is being voided. It is stored on the entry for the audit trail. An empty or whitespace-only string is refused.","examples":["Duplicate of CCE-2201"]}},"additionalProperties":false,"required":["voidReason"]},"deleteLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]}},"additionalProperties":false,"required":["id"]},"searchPerformanceObligationOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the performance obligation."},"performanceObligationNumber":{"type":"string","description":"The performance obligation number. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the performance obligation, as it appears on revenue contracts and schedules."},"description":{"type":"string","description":"A free-form description of what the obligation covers. Absent when none is set."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this obligation is in effect. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this obligation is in effect. Format YYYY-MM-DD. Absent when the obligation is open-ended."},"allocationStartDate":{"type":"string","format":"date","description":"The date from which revenue for this obligation takes part in allocation. Format YYYY-MM-DD. Absent when none is set."},"isAllocationExcluded":{"type":"boolean","description":"Whether the revenue contract lines of this obligation are left out of fair-value allocation."},"isNetAccounting":{"type":"boolean","description":"Whether the obligation is accounted net rather than gross."},"defaultAmortizationMethod":{"type":"string","description":"The default amortization method used when scheduling this obligation's revenue. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"standaloneSellingPriceRangeType":{"type":"string","description":"How the obligation's standalone selling price ranges are expressed. Possible values: 'percentage', 'amount'."},"revenueSchedulingTemplateId":{"type":"string","description":"The unique identifier for the revenue scheduling template that schedules this obligation's revenue. See id on GET accounting/revenue-scheduling-templates/:id."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template that schedules this obligation's revenue."},"standaloneSellingPriceStratificationConfigurationId":{"type":"string","description":"The unique identifier for the standalone selling price stratification configuration this obligation stratifies by. Absent when none is set. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the performance obligation last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"standaloneSellingPriceRanges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the standalone selling price range."},"rangeNumber":{"type":"string","description":"The standalone selling price range number."},"rangeType":{"type":"string","description":"How this range is expressed. Possible values: 'percentage', 'amount'."},"currency":{"type":"string","description":"The currency the amounts are given in. Format ISO 4217, for example 'USD'. Absent on a percentage range."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this range applies. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this range applies. Format YYYY-MM-DD. Absent when the range is open-ended."},"lowAmount":{"type":"string","format":"decimal","description":"The lower bound of the standalone selling price, in the range currency. Set on an amount range."},"midAmount":{"type":"string","format":"decimal","description":"The midpoint of the standalone selling price, in the range currency. Set on an amount range."},"highAmount":{"type":"string","format":"decimal","description":"The upper bound of the standalone selling price, in the range currency. Set on an amount range."},"lowPercentage":{"type":"string","format":"decimal","description":"The lower bound of the standalone selling price, as a percentage of list price. Set on a percentage range."},"midPercentage":{"type":"string","format":"decimal","description":"The midpoint of the standalone selling price, as a percentage of list price. Set on a percentage range."},"highPercentage":{"type":"string","format":"decimal","description":"The upper bound of the standalone selling price, as a percentage of list price. Set on a percentage range."},"term":{"type":"string","description":"The period the range's prices are quoted over. Possible values: 'monthly', 'annually', 'none'."},"unitOfMeasure":{"type":"string","description":"The unit the range's prices are quoted per."},"productId":{"type":"string","description":"The product this range prices. Absent on a range that applies to the whole obligation. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product."},"productName":{"type":"string","description":"The name of that product."}},"additionalProperties":false,"required":["effectiveStartDate"]},"description":"The obligation's standalone selling price ranges, one per product and effective period. An empty array when none are configured. Which of the amount and percentage fields are set follows each range's rangeType."}},"additionalProperties":false,"required":["id","name","effectiveStartDate","isAllocationExcluded","isNetAccounting","lastModifiedDate"]},"description":"The performance obligations on this page, newest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more performance obligations remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPerformanceObligationInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the performance obligation with this identifier."},"performanceObligationNumber":{"type":"string","description":"Limits results to the performance obligation with this number, for example 'POB-1042'."},"name":{"type":"string","description":"Limits results to performance obligations whose name contains this text. The match is case-insensitive."},"revenueSchedulingTemplateId":{"type":"string","description":"Limits results to obligations scheduled by the revenue scheduling template with this identifier. An identifier matching no template returns an empty page."},"standaloneSellingPriceRangeType":{"type":"string","description":"Limits results to obligations whose standalone selling price ranges are expressed this way. Accepted values: 'percentage', 'amount'. Any other value matches nothing."},"isAllocationExcluded":{"type":"boolean","description":"Limits results by whether the obligation's revenue contract lines are left out of fair-value allocation."},"productId":{"type":"string","description":"Limits results to obligations that have a product line for the product with this identifier. An identifier matching no product, or a product no obligation covers, returns an empty page."}},"additionalProperties":false,"description":"The filters to apply. A performance obligation must match every filter you send. Omit to return all performance obligations."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of performance obligations per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"bulkCreateUnitOfMeasureGroupsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created unit of measure group."}},"additionalProperties":false,"required":["id"]},"description":"The created unit of measure groups, in the same order as the input. Match entries to inputs by index. Read a group with GET inventory/unit-of-measure-groups/:id to learn the ids assigned to its lines.","examples":[[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"},{"id":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateUnitOfMeasureGroupsInput":{"type":"object","properties":{"unitOfMeasureGroups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the unit of measure group. Required. It is not checked for uniqueness."},"description":{"type":"string","description":"A free-form description of what the group covers. Omit for none."},"baseUnitOfMeasureId":{"type":"string","description":"The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Required. It is fixed for the life of the group and gets its own line automatically with a factor of 1, so do not list it in lines. See id on GET inventory/unit-of-measures/:id."},"lines":{"type":"array","items":{"type":"object","properties":{"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It must be greater than zero."}},"additionalProperties":false,"required":["unitOfMeasureId","conversionFactor"]},"description":"The conversion lines for this group, beyond the base unit's automatic one. Each unit of measure may appear at most once within this entry."}},"additionalProperties":false,"required":["name","baseUnitOfMeasureId"]},"description":"The unit of measure groups to create, each with its own conversion lines. If any entry is invalid, nothing is created and the whole call fails.","examples":[[{"name":"Packaging","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","lines":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"12.00"}]},{"name":"Weight","baseUnitOfMeasureId":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b"}]]}},"additionalProperties":false,"required":["unitOfMeasureGroups"]},"updateCreditMemoOutput":{"type":"object","properties":{},"additionalProperties":false},"updateCreditMemoInput":{"type":"object","properties":{"creditMemoDate":{"type":"string","format":"date","description":"The new issue date. Use format YYYY-MM-DD."},"description":{"type":"string","description":"The new description."},"externalCreditMemoId":{"type":"string","description":"The new identifier of this credit memo in an external source system."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo line to edit, as returned by GET accounting/credit-memos/:id."},"description":{"type":"string","description":"The new line description, as shown to the customer. On a manual credit memo it cannot be cleared, because a description is required there."}},"additionalProperties":false,"required":["id"]},"description":"The line edits, keyed by line id. Only the description can be edited. Lines cannot be added or removed here."}},"additionalProperties":false},"accountDeterminationRulesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique.","examples":["Finished goods — receipts"]},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used. A rule with no `priority` counts as 0.","examples":[10]},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rule is active.","examples":[true]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the rule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Requests that change only the reason-code overrides do not update this field.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"unitOfMeasureGroupsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure group.","examples":["2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"]},"name":{"type":"string","description":"The display name of the unit of measure group. Names are not unique.","examples":["Packaging"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of what the group covers.","examples":["Eaches, boxes and pallets"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the unit of measure group or its conversion lines last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"searchBankEntryOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank entry."},"bankEntryNumber":{"type":"string","description":"The bank entry number. Absent until one has been assigned."},"name":{"type":"string","description":"The display name of the bank entry."},"description":{"type":"string","description":"A free-form description of the entry."},"transactionDate":{"type":"string","format":"date","description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"type":"string","description":"The reconciliation status of the entry. Possible values: 'matched', 'unmatched', 'voided', 'integrated'."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"type":"string","description":"A label for the source system the entry was created from."},"externalUrl":{"type":"string","description":"A link to the source document in an external system."},"bankAccountId":{"type":"string","description":"The bank general-ledger account this entry is recorded against. See id on GET accounting/accounts/:id."},"bankAccountName":{"type":"string","description":"The name of the bank general-ledger account."},"entityId":{"type":"string","description":"The legal entity this entry is posted under. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A free-form description of the line."},"lineType":{"type":"string","description":"The kind of line. Possible values: 'oneTime', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The gross line amount, including VAT, in the entry currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217. It always matches the entry currency."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the entry currency."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount on the line, in the entry currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%."},"origin":{"type":"string","description":"A label for the source system, copied onto the line from the entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. To read its schedule lines, pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted entry reads 'notStarted' until the entry posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id. Absent on a schedule that has no schedule lines yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far by the schedule lines whose journal entries are posted, in the entry currency. Zero until the first schedule line's journal entry is posted."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. To read the schedule lines, use GET accounting/amortization-schedule-lines and filter on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The posting lines of the entry, one per general-ledger posting. An empty array when the entry has none."}},"additionalProperties":false,"required":["id","transactionDate","status","lastModifiedDate"]},"description":"The bank entries on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor to pass as page.cursor for the next page. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchBankEntryInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the bank entry with this identifier."},"bankEntryNumber":{"type":"string","description":"Limits results to the bank entry with this number. The match is exact."},"journalEntryNumber":{"type":"string","description":"Limits results to entries that posted to the journal entry with this number. The match is exact."},"status":{"type":"string","description":"Limits results to entries in this status. Accepted values: 'matched', 'unmatched', 'voided', 'integrated'. Any other value matches nothing."},"currency":{"type":"string","description":"Limits results to entries denominated in this currency. Format ISO 4217, for example 'USD'."},"bankAccountId":{"type":"string","description":"Limits results to entries recorded against this bank general-ledger account. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"Limits results to entries posted under this legal entity. See id on GET base/entities."},"origin":{"type":"string","description":"Limits results to entries created by this source system. The match is exact."}},"additionalProperties":false,"description":"The filters to apply. A bank entry must match every filter you send. Omit to return all bank entries.","examples":[{"status":"unmatched"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of bank entries per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"createUnitOfMeasureGroupOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created unit of measure group.","examples":["2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"]}},"additionalProperties":false,"required":["id"]},"createUnitOfMeasureGroupInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the unit of measure group. Required. It is not checked for uniqueness.","examples":["Packaging"]},"description":{"type":"string","description":"A free-form description of what the group covers. Omit for none.","examples":["Eaches, boxes and pallets"]},"baseUnitOfMeasureId":{"type":"string","description":"The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Required. It is fixed for the life of the group and gets its own line automatically with a factor of 1, so do not list it in lines. See id on GET inventory/unit-of-measures/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"lines":{"type":"array","items":{"type":"object","properties":{"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. It must not be the base unit and must not repeat another line in this request. See id on GET inventory/unit-of-measures/:id."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It must be greater than zero."}},"additionalProperties":false,"required":["unitOfMeasureId","conversionFactor"]},"description":"The conversion lines to add, beyond the base unit's automatic one. Omit for a group with only its base unit. Each unit of measure may appear at most once, and none may be the base unit.","examples":[[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"12.00"}]]}},"additionalProperties":false,"required":["name","baseUnitOfMeasureId"]},"invoicesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice."},"invoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice number, for example 'INV-1', unique within the tenant. Absent while none has been assigned."},"invoiceDate":{"type":"string","format":"date","description":"The date the invoice was issued. Format YYYY-MM-DD. Payment terms and the general ledger impact are both based on this date."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date payment falls due, the invoice date plus the payment term. Format YYYY-MM-DD. Absent when no term has been resolved."},"lastPaidDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the most recent payment was applied. Format YYYY-MM-DD. Absent on an invoice that has never been paid against."},"invoiceStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The settlement status of the invoice. Possible values: 'unpaid', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'isOverdue', 'disputed'."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The finance approval status of the invoice. Possible values: 'draft', 'pendingApproval', 'approved', 'revise', 'rejected'."},"deliveryStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How far the invoice has got in being sent to the customer. Possible values: 'created', 'toBeSent', 'delivered', 'read', 'failed'."},"disputeStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The dispute status of the invoice, set only when payments against it are under dispute. Possible values: 'disputed', 'chargedBack'."},"dataSource":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system the invoice record was imported from, for invoices that arrived through an integration or migration rather than being created in this system. For example 'NetSuite', 'Quickbooks', 'Stripe' or 'MigrationFile'. Absent on invoices created in this system."},"currency":{"type":"string","description":"The currency of the invoice. Format ISO 4217, for example 'USD'. It applies to every amount on the record, on the header and on every line."},"customerMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form message printed on the invoice for the customer."},"externalInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice's identifier in an external source system, kept for reconciliation. For identifiers owned by your other systems, prefer externalIdentifiers below."},"invoiceEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address of the business contact that receives this invoice."},"purchaseOrderOverride":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A manually entered PO number that overrides the sales-order-derived values in purchaseOrders."},"paymentTermDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days after the invoice date that payment falls due, resolved from the invoice's payment term. The term record itself is not published, only its day count."},"exchangeRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The rate used to convert the invoice's currency to the entity's functional currency. Absent when no conversion applies."},"excludeFromTaxEngine":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the invoice is left out of the tax engine. Derived from the sales order."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer the invoice is issued to. See id on GET accounting/customers/:id."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the customer, as it appears on the document."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number of the customer, unique within the tenant."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity issuing the invoice. See id on GET base/entities."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the issuing legal entity."},"salesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order the invoice was billed from. Absent on invoices created directly. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the source sales order. Present whenever salesOrderId is."},"subtotal":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount before taxes and discounts, in the invoice currency. Absent when no subtotal has been computed."},"totalTax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total tax across all lines, in the invoice currency."},"totalDutiesAndCustoms":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total duties and customs across all lines, in the invoice currency."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total invoiced, including taxes and duties, in the invoice currency."},"totalAmountDue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount that was due when the invoice was created, in the invoice currency."},"totalCredited":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total credited back against this invoice by credit memos, in the invoice currency."},"totalLateFeeAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total late fees charged on this invoice, in the invoice currency."},"lineDiscounts":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of discount amounts across all invoice lines, in the invoice currency."},"oneTimeDiscount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The one-time discount applied to the invoice as a whole, in the invoice currency."},"paymentsApplied":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount settled by payments so far, in the invoice currency."},"adjustments":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of small-balance write-offs and early-payment discounts recorded against this invoice, in the invoice currency."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the invoice record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchUnitOfMeasuresOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure."},"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. It is unique within the tenant."},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the unit of measure record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","unitCode","unitName"]},"description":"The units of measure on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"KG","unitName":"Kilogram","lastModifiedDate":"2026-05-12T09:30:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more units of measure remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchUnitOfMeasuresInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"unitCode":{"type":"string","description":"Limits results to the unit of measure with this code. The match is exact. Codes are unique, so this matches at most one unit of measure."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to units of measure changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A unit of measure must match every filter you send. Send an empty object to return all units of measure.","examples":[{"unitCode":"KG"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of units of measure per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkDeleteSalesReturnsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The identifiers of the deleted returns, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteSalesReturnsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The identifiers of the returns to delete. If any is missing or is not a draft, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"updatePaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePaymentInput":{"type":"object","properties":{"paymentDate":{"type":"string","format":"date","description":"The new payment date. Use format YYYY-MM-DD. Omit to leave it unchanged."},"paymentType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The new payment method. Omit to leave it unchanged."},"amount":{"type":"string","format":"decimal","description":"The new total payment amount, in the payment's currency. Must be greater than 0. Omit to leave it unchanged."},"accountId":{"type":"string","description":"A different ledger account to post the payment to. Omit to leave it unchanged. See id on GET accounting/accounts/:id."},"paymentReference":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A new payer-supplied reference. Omit to leave it unchanged. Pass null to clear it."},"paymentNote":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A new free-form note. Omit to leave it unchanged. Pass null to clear it."},"bankFeeAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"A new bank fee, in the payment's currency. Omit to leave it unchanged. Pass null to clear it."},"thirdPartyPayerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A different third-party payer. Omit to leave it unchanged. Pass null to clear it, attributing the payment back to the invoiced customer. See id on GET accounting/customers/:id."}},"additionalProperties":false},"getWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'.","examples":["WTR-2291"]},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"locationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"targetLocationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer line. updateLines and deleteLines address lines by it."},"itemId":{"type":"string","description":"The item being moved. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from, the document's warehouse applied to every line. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much moves, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"transferCost":{"type":"string","format":"decimal","description":"What one unit left the source warehouse at, in the transfer's currency. The valuation method sets it at commit. Absent on a draft."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit on an intercompany transfer, in the contractual currency. Supplied on create."},"totalTransferValue":{"type":"string","format":"decimal","description":"The line's total on an intercompany transfer, in the contractual currency: totalTransferValue = unitTransferValue x quantity. Written by the platform."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this line has come back on an intercompany return."},"status":{"type":"string","description":"The status of the line."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number. See id on GET inventory/batch-numbers/:id."},"batchNumber":{"type":"string","description":"The batch number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"What this batch moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The batches that make up the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number. See id on GET inventory/serial-numbers/:id."},"serialNumber":{"type":"string","description":"The serial number."},"quantity":{"type":"string","format":"decimal","description":"Always one, for a serialized unit."},"unitCost":{"type":"string","format":"decimal","description":"What this unit moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The serialized units that move."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"fromBinLocationCode":{"type":"string","description":"The code of that bin."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"toBinLocationCode":{"type":"string","description":"The code of that bin."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer. The collection GET inventory/warehouse-transfers returns lineCount in place of these.","examples":[[{"id":"7d2b48e1-95c3-4a06-8f17-3e5a9c06b2d4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","unitCode":"EA","quantity":"24","inventoryQuantity":"24"}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"pricingRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header."},"headerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The pricing header number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The product line this pricing header prices. See id on GET accounting/product-lines/:id."},"productLineName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the product line. See name on GET accounting/product-lines/:id."},"productLineNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product line number. See productLineNumber on GET accounting/product-lines/:id."},"productId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the product. See productName on GET accounting/products/:id."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"dataSource":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system or import job that produced the pricing header. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"hasBeenUsed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether at least one sales order line uses this pricing header."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the pricing header was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the pricing header last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"inventoryLevelsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory level.","examples":["0b6d4c93-71ea-4f28-9c05-83a1e7f6204d"]},"itemId":{"type":"string","description":"The unique identifier for the item this level is for. See id on GET inventory/items/:id.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The item's short code.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The item's name.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier for the location this level is at. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The location's short code.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The location's name.","examples":["Rotterdam Distribution Centre"]},"onHandQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total physical quantity on hand at this location, in the item's stocking unit of measure.","examples":["1200.00"]},"availableQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity free to allocate: onHandQuantity minus allocatedQuantity and reservedQuantity.","examples":["1150.00"]},"allocatedQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity allocated to outbound demand.","examples":["50.00"]},"reservedQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity reserved."},"inTransitQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity in transit to this location."},"damagedQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity flagged as damaged."},"qualityHoldQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity on quality hold."},"averageCost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The moving-average unit cost, in the currency given by currency.","examples":["3.75"]},"onHandValue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value of the stock on hand, in the currency given by currency.","examples":["4500.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of averageCost and onHandValue. Format ISO 4217, for example 'EUR'. Absent when the level has no valuation yet.","examples":["EUR"]},"lastTransactionTimestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time a stock movement last touched this level. Format YYYY-MM-DDTHH:mm:ss. Unlike lastModifiedDate, it changes only when stock moves.","examples":["2026-08-03T11:15:00"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory-level record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false},"updateBatchNumberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch number. Format: UUID.","examples":["7a4e91c3-2b58-4d06-9f31-c85e207a4b19"]},"batchStatus":{"type":"string","description":"The status of the batch after the update. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'.","examples":["QUARANTINED"]}},"additionalProperties":false,"required":["id"]},"updateBatchNumberInput":{"type":"object","properties":{"manufacturerBatchNumber":{"type":"string","description":"The manufacturer's batch number."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD."},"manufactureDate":{"type":"string","format":"date","description":"The date the manufacturer made the batch. Format: YYYY-MM-DD."},"bestBeforeDate":{"type":"string","format":"date","description":"The best-before date of the batch. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the batch's age is counted from. Format: YYYY-MM-DD. The date you send applies to all of the batch's stock. If a receipt or inventory increase for the batch comes after your update, it sets a new date and replaces the date you sent."},"batchStatus":{"type":"string","description":"The status of the batch. Changing the status does not change the batch's `quantity`, `inStock`, or `cost`. Accepted values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'.","examples":["QUARANTINED"]},"temperatureBreach":{"type":"boolean","description":"Whether the batch has been outside its storage temperature range."},"qcStatus":{"type":"string","description":"The quality-control status of the batch, as free text.","examples":["Awaiting lab result"]},"active":{"type":"boolean","description":"Whether the batch is active."}},"additionalProperties":false},"searchFundTransferOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fund transfer."},"fundTransferNumber":{"type":"string","description":"The fund transfer number, for example 'FT-71122'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the fund transfer."},"description":{"type":"string","description":"A free-form description of the transfer."},"transferDate":{"type":"string","format":"date","description":"The date the money moved. Format YYYY-MM-DD."},"transferAmount":{"type":"string","format":"decimal","description":"The amount moved, in the transfer currency."},"currency":{"type":"string","description":"The transfer currency. Format ISO 4217, for example 'USD'. transferAmount is in this currency."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate applied when the two accounts are held in different currencies."},"isVoided":{"type":"boolean","description":"Whether the transfer has been voided. A voided transfer is kept for audit rather than deleted."},"isIntercompany":{"type":"boolean","description":"Whether the transfer moves money between two legal entities rather than between two accounts of one entity. When true, toEntityId names the receiving entity."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this transfer posted to, on GET accounting/journal-entries. Absent until the transfer has posted."},"origin":{"type":"string","description":"The system or process the transfer came from."},"externalUrl":{"type":"string","description":"An absolute http or https link to the source document in an external system."},"externalPaymentId":{"type":"string","description":"The identifier of this payment in the external system that initiated the transfer. It is not unique."},"fromAccountId":{"type":"string","description":"The general-ledger account the money left. See id on GET accounting/accounts/:id."},"fromAccountName":{"type":"string","description":"The name of the account the money left."},"toAccountId":{"type":"string","description":"The general-ledger account the money arrived in. See id on GET accounting/accounts/:id."},"toAccountName":{"type":"string","description":"The name of the account the money arrived in."},"entityId":{"type":"string","description":"The legal entity the transfer is posted under. On an intercompany transfer this is the sending entity. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the transfer is posted under."},"toEntityId":{"type":"string","description":"The receiving legal entity on an intercompany transfer. Absent on a same-entity transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of the receiving legal entity on an intercompany transfer."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fund transfer last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"accountType":{"type":"string","description":"Which side of the transfer this line is. Possible values: 'from', 'to'."},"description":{"type":"string","description":"A free-form description of the line."},"amount":{"type":"string","format":"decimal","description":"The line amount, in the line currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. It differs from the transfer currency only on a cross-currency transfer."},"bankFee":{"type":"string","format":"decimal","description":"The bank fee charged on this side of the transfer, in the line currency."}},"additionalProperties":false,"required":["id","accountType"]},"description":"The two sides of the transfer, one line per side. Read accountType to tell them apart rather than relying on order."}},"additionalProperties":false,"required":["id","transferDate","lastModifiedDate"]},"description":"The fund transfers on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchFundTransferInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the fund transfer with this identifier."},"fundTransferNumber":{"type":"string","description":"Limits results to the fund transfer with this number. The match is exact."},"journalEntryNumber":{"type":"string","description":"Limits results to fund transfers posted to the journal entry with this number. The match is exact."},"externalPaymentId":{"type":"string","description":"Limits results to fund transfers with this external payment identifier. It is not unique, so several transfers can match. The match is exact."},"fromAccountId":{"type":"string","description":"Limits results to transfers that left this general-ledger account. See id on GET accounting/accounts/:id."},"toAccountId":{"type":"string","description":"Limits results to transfers that arrived in this general-ledger account. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"Limits results to transfers posted under this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to transfers posted under the legal entity with this name. The match is exact and case-sensitive."},"isVoided":{"type":"boolean","description":"Limits results to voided transfers when true, and to live transfers when false. Omit to return both."},"isIntercompany":{"type":"boolean","description":"Limits results to intercompany transfers when true, and to same-entity transfers when false. Omit to return both."},"origin":{"type":"string","description":"Limits results to transfers with this origin. The match is exact."}},"additionalProperties":false,"description":"The filters to apply. A fund transfer must match every filter you send. Omit to return all fund transfers.","examples":[{"isVoided":false}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of fund transfers per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"itemCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item category.","examples":["a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"]},"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not unique: two categories can share a name, so use id to address one.","examples":["Hardware"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of what the category covers. Absent when none was set.","examples":["Fasteners, fittings and tooling"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the category can be chosen on new items. When false the category is retired: existing items keep it and new ones cannot be assigned to it.","examples":[true]},"idealTurnoverRatio":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency.","examples":["6.50"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"cancelAccountingSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"status":{"type":"string","description":"The lifecycle status after the call. Always 'cancelled' on success."}},"additionalProperties":false,"required":["id","status"]},"cancelAccountingSalesReturnInput":{"type":"object","properties":{},"additionalProperties":false},"applyCreditMemoOutput":{"type":"object","properties":{},"additionalProperties":false},"applyCreditMemoInput":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to apply against. See id on GET accounting/invoices/:id."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount to apply, in the credit memo currency. Must be positive. The credit memo currency governs. There is no per-row currency."},"appliedDate":{"type":"string","format":"date","description":"The date the allocation is recorded. Use format YYYY-MM-DD. It must fall in an open accounting period."}},"additionalProperties":false,"required":["invoiceId","appliedAmount","appliedDate"]},"description":"The allocations to record. At least one is required. Several rows may target the same invoice, and are summed against that invoice's amount due."}},"additionalProperties":false,"required":["applications"]},"getBankEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank entry."},"bankEntryNumber":{"type":"string","description":"The bank entry number. Absent until one has been assigned."},"name":{"type":"string","description":"The display name of the bank entry."},"description":{"type":"string","description":"A free-form description of the entry."},"transactionDate":{"type":"string","format":"date","description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD. Defaults to the transaction date where the entity's country requires a service date."},"currency":{"type":"string","description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"type":"string","description":"The reconciliation status of the entry. Possible values: 'matched', 'unmatched', 'voided', 'integrated'."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"type":"string","description":"A label for the source system the entry was created from."},"externalUrl":{"type":"string","description":"A link to the source document in an external system."},"bankAccountId":{"type":"string","description":"The bank general-ledger account this entry is recorded against. See id on GET accounting/accounts/:id."},"bankAccountName":{"type":"string","description":"The name of the bank general-ledger account."},"entityId":{"type":"string","description":"The legal entity this entry is posted under. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A free-form description of the line."},"lineType":{"type":"string","description":"The kind of line. Possible values: 'oneTime', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The gross line amount, including VAT, in the entry currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217. It always matches the entry currency."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the entry currency."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount on the line, in the entry currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%."},"origin":{"type":"string","description":"A label for the source system, copied onto the line from the entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. To read its schedule lines, pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted entry reads 'notStarted' until the entry posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id. Absent on a schedule that has no schedule lines yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far by the schedule lines whose journal entries are posted, in the entry currency. Zero until the first schedule line's journal entry is posted."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. To read the schedule lines, use GET accounting/amortization-schedule-lines and filter on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The posting lines of the entry, one per general-ledger posting. An empty array when the entry has none."}},"additionalProperties":false,"required":["id","transactionDate","status","lastModifiedDate"]},"subscriptionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the subscription."},"subscriptionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The subscription number. Unique within the tenant. Example: 'SUB-1'."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer this subscription belongs to. See name on GET accounting/customers/:id."},"currency":{"type":"string","description":"The currency of annualRecurringRevenue and monthlyRecurringRevenue. Format ISO 4217, for example 'USD'."},"autoRenew":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The length of the auto-renewal term, in the subscription's term unit."},"renewalPriceChangePercentage":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The percentage by which the price changes on renewal."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"subscriptionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the subscription, derived from the status of its lines. Possible values: 'pendingActivation', 'notStarted', 'active', 'pendingOrderApproval', 'canceled', 'suspended'."},"serviceStartDateBasis":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the service start date is determined. Possible values: 'fixedDate', 'serviceActivation'."},"serviceActivationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date service was activated. Set only when serviceStartDateBasis is 'serviceActivation'. Format YYYY-MM-DD."},"serviceStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The latest service end date across all of the subscription's lines. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"submissionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The submission date of the sales order this subscription came from. Format YYYY-MM-DD."},"cancellationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date from which the subscription is or will be canceled. Absent when no cancellation has been recorded. Format YYYY-MM-DD."},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason code for the cancellation. Possible values: 'noReasonGiven', 'budgetary', 'movingToCompetitors', 'lowCustomerSatisfaction', 'bankruptcy', 'acquisitionMerger'. Absent when the subscription has not been canceled."},"isCancellationEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the cancellation procedure has been applied to this subscription."},"suspensionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date from which the subscription is or will be suspended. Absent when no suspension has been recorded. Format YYYY-MM-DD."},"suspensionReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason code for the suspension. Possible values: 'unpaidBalance', 'invalidPaymentMethod'. Absent when the subscription has not been suspended."},"isSuspensionEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the suspension process is enabled for this subscription."},"externalSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"annualRecurringRevenue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The annual recurring revenue, in the subscription's currency: the sum of annualRecurringRevenue across its active and suspended lines."},"monthlyRecurringRevenue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The monthly recurring revenue, in the subscription's currency: the sum of monthlyRecurringRevenue across its active and suspended lines."},"totalUserCount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The number of active users or seats across the subscription's active lines."},"prepaidBalance":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The prepaid balance remaining for this subscription, summed across the prepaid balances linked to it. The balance is a quantity, not a currency amount."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the subscription last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateShipmentCarrierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment carrier.","examples":["5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"]}},"additionalProperties":false,"required":["id"]},"updateShipmentCarrierInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. It cannot be cleared and is not checked for uniqueness."},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments.","examples":[false]},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the vendor this carrier bills through. Send a vendor's identifier to set or repoint the link, or send null to clear it. An identifier matching no vendor fails the call with VENDOR_NOT_FOUND. See id on GET accounting/vendors/:id."}},"additionalProperties":false},"searchAccountingProductsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product."},"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant."},"productNumber":{"type":"string","description":"The product number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"description":{"type":"string","description":"A description of the product shown to customers."},"internalDescription":{"type":"string","description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"type":"string","description":"The product's identifier in an external CRM system."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The date the product is no longer available. Format YYYY-MM-DD. Absent for a product with no end date."},"productFamily":{"type":"string","description":"The product family. Possible values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"The product type. Possible values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"productStatus":{"type":"string","description":"The product's availability status, computed by the system. Possible values: 'draft', 'available', 'unavailable', 'incomplete'. The status is derived from the product's lines, pricing, and effective dates and cannot be set directly."},"isInventory":{"type":"boolean","description":"Whether the product is tracked as inventory."},"itemIds":{"type":"array","items":{"type":"string"},"description":"The inventory items linked to this product. Used only when isInventory is true. Absent when the product has none. See id on GET inventory/items/:id."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the product record was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the product has none."}},"additionalProperties":false,"required":["id","productName","productCode","effectiveStartDate","lastModifiedDate"]},"description":"The products on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more products remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingProductsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"term":{"type":"string","description":"Limits results to products whose name, code or description contains this text. The match is case-insensitive."},"productCode":{"type":"string","description":"Limits results to the product with this product code. The match is exact."},"crmProductId":{"type":"string","description":"Limits results to the product with this CRM identifier. The match is exact."},"productStatus":{"type":"string","description":"Limits results to products with this status. Accepted values: 'draft', 'available', 'unavailable', 'incomplete'."},"productFamily":{"type":"string","description":"Limits results to products of this family. Accepted values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"Limits results to products of this type. Accepted values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"isInventory":{"type":"boolean","description":"Limits results to products with this inventory-tracking flag."},"effectiveStartDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound. Use format YYYY-MM-DD."},"end":{"type":"string","description":"The inclusive upper bound. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the date the product becomes available. Bounds are inclusive."},"effectiveEndDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound. Use format YYYY-MM-DD."},"end":{"type":"string","description":"The inclusive upper bound. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the date the product is no longer available. Bounds are inclusive. A product with no end date matches any lower bound."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the product last changed. Bounds are inclusive."},"entityId":{"type":"string","description":"Limits results to products visible to this legal entity: shared products and products assigned to it. See id on GET base/entities. An identifier that matches no entity returns an empty page, not an error."}},"additionalProperties":false,"description":"The filters to apply. A product must match every filter you send. Omit to return all products."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of products per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"bulkCreateInventoryRevaluationsOutput":{"type":"object","properties":{"inventoryRevaluations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation."},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'."},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'."},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet."},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation."},"lineCount":{"type":"number","description":"How many lines the revaluation has."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The created revaluations, in input order, headers only. Read one in full on its own endpoint.","examples":[[{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"DRAFT","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]}},"additionalProperties":false,"required":["inventoryRevaluations"]},"bulkCreateInventoryRevaluationsInput":{"type":"object","properties":{"inventoryRevaluations":{"type":"array","items":{"type":"object","properties":{"costingValuationType":{"type":"string","description":"How the value change is recorded. Accepted values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required, because the commit refuses a document without one."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Defaults to the entity that owns the first line's warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to date the revaluation. Defaults to today. Use format YYYY-MM-DD."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account the expense comes off. Required when costingValuationType is 'directCostCapitalisation'. See id on GET accounting/chart-of-accounts/:id."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the revaluation."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item to revalue. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates. Must be greater than zero."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the legal entity's functional currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize. Moving-average direct cost capitalization only."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity","currentUnitCost","newUnitCost"]},"description":"The lines of the revaluation. At least one is required."}},"additionalProperties":false,"required":["costingValuationType","costingElementTypeId","lines"]},"description":"The revaluations to create. All or nothing: if any is rejected, none is written.","examples":[[{"costingValuationType":"revaluation","costingElementTypeId":"f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","unitId":"d5a71e93-4c08-4b26-95f7-2e6a8c30b41f","quantity":"150","currentUnitCost":"12","newUnitCost":"9"}]}]]}},"additionalProperties":false,"required":["inventoryRevaluations"]},"getPerformanceObligationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the performance obligation."},"performanceObligationNumber":{"type":"string","description":"The performance obligation number. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the performance obligation, as it appears on revenue contracts and schedules."},"description":{"type":"string","description":"A free-form description of what the obligation covers. Absent when none is set."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this obligation is in effect. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this obligation is in effect. Format YYYY-MM-DD. Absent when the obligation is open-ended."},"allocationStartDate":{"type":"string","format":"date","description":"The date from which revenue for this obligation takes part in allocation. Format YYYY-MM-DD. Absent when none is set."},"isAllocationExcluded":{"type":"boolean","description":"Whether the revenue contract lines of this obligation are left out of fair-value allocation."},"isNetAccounting":{"type":"boolean","description":"Whether the obligation is accounted net rather than gross."},"defaultAmortizationMethod":{"type":"string","description":"The default amortization method used when scheduling this obligation's revenue. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"standaloneSellingPriceRangeType":{"type":"string","description":"How the obligation's standalone selling price ranges are expressed. Possible values: 'percentage', 'amount'."},"revenueSchedulingTemplateId":{"type":"string","description":"The unique identifier for the revenue scheduling template that schedules this obligation's revenue. See id on GET accounting/revenue-scheduling-templates/:id."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template that schedules this obligation's revenue."},"standaloneSellingPriceStratificationConfigurationId":{"type":"string","description":"The unique identifier for the standalone selling price stratification configuration this obligation stratifies by. Absent when none is set. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the performance obligation last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"standaloneSellingPriceRanges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the standalone selling price range."},"rangeNumber":{"type":"string","description":"The standalone selling price range number."},"rangeType":{"type":"string","description":"How this range is expressed. Possible values: 'percentage', 'amount'."},"currency":{"type":"string","description":"The currency the amounts are given in. Format ISO 4217, for example 'USD'. Absent on a percentage range."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this range applies. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this range applies. Format YYYY-MM-DD. Absent when the range is open-ended."},"lowAmount":{"type":"string","format":"decimal","description":"The lower bound of the standalone selling price, in the range currency. Set on an amount range."},"midAmount":{"type":"string","format":"decimal","description":"The midpoint of the standalone selling price, in the range currency. Set on an amount range."},"highAmount":{"type":"string","format":"decimal","description":"The upper bound of the standalone selling price, in the range currency. Set on an amount range."},"lowPercentage":{"type":"string","format":"decimal","description":"The lower bound of the standalone selling price, as a percentage of list price. Set on a percentage range."},"midPercentage":{"type":"string","format":"decimal","description":"The midpoint of the standalone selling price, as a percentage of list price. Set on a percentage range."},"highPercentage":{"type":"string","format":"decimal","description":"The upper bound of the standalone selling price, as a percentage of list price. Set on a percentage range."},"term":{"type":"string","description":"The period the range's prices are quoted over. Possible values: 'monthly', 'annually', 'none'."},"unitOfMeasure":{"type":"string","description":"The unit the range's prices are quoted per."},"productId":{"type":"string","description":"The product this range prices. Absent on a range that applies to the whole obligation. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product."},"productName":{"type":"string","description":"The name of that product."}},"additionalProperties":false,"required":["effectiveStartDate"]},"description":"The obligation's standalone selling price ranges, one per product and effective period. An empty array when none are configured. Which of the amount and percentage fields are set follows each range's rangeType."}},"additionalProperties":false,"required":["id","name","effectiveStartDate","isAllocationExcluded","isNetAccounting","lastModifiedDate"]},"deleteShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]}},"additionalProperties":false,"required":["id"]},"runFinancialStatementOutput":{"type":"object","properties":{"statementId":{"type":"string","description":"The statement template that produced this report, echoing the statementId input."},"statementName":{"type":"string","description":"The template's configured name."},"statementType":{"type":"string","description":"The reporting standard and statement kind of the template that ran. Possible values: 'generic', 'coaIncomeStatement', 'coaBalanceSheet', 'gaapIncomeStatement', 'gaapBalanceSheet', 'cashFlow', 'hgbIncomeStatement', 'hgbBalanceSheet', 'ifrsStatementOfProfitOrLoss', 'ifrsStatementOfFinancialPosition', 'ifrsStatementOfOtherComprehensiveIncome', 'sfrsStatementOfProfitOrLoss', 'sfrsStatementOfFinancialPosition', 'sfrsStatementOfOtherComprehensiveIncome'."},"data":{"$ref":"#/components/schemas/UnknownValue","description":"The computed report, produced by the statement calculation. It has no fixed schema: the shape depends on the template's type and on splitBy. Expect a hierarchy of statement lines with their computed amounts per column, and account-level detail rows are always present, so you can aggregate or drill down. Treat unfamiliar fields as data rather than an error."}},"additionalProperties":false,"required":["statementId","statementName","statementType","data"]},"runFinancialStatementInput":{"type":"object","properties":{"statementId":{"type":"string","description":"The configured statement template to run. A template that has been deleted is reported as STATEMENT_NOT_FOUND. This API has no endpoint that lists the templates."},"entityId":{"type":"string","description":"The entity to report on. When consolidated is false, this is the reporting entity on its own. When true, this is the consolidating parent and the report covers its whole hierarchy. Exactly one entity per request. See id on GET base/entities."},"bookId":{"type":"string","description":"The accounting book to report from. It must belong to entityId. A book that belongs to another entity is reported as BOOK_NOT_FOUND. Exactly one book per request, because amounts from different books are not comparable. See id on GET accounting/books/:id."},"periodIds":{"type":"array","items":{"type":"string"},"description":"The accounting periods to report over, at least one. Period names are not accepted, because their format varies per fiscal calendar. The periods need not be contiguous, and how they become columns depends on the template and on splitBy. See id on GET accounting/accounting-periods/:id."},"consolidated":{"type":"boolean","description":"Whether to report the consolidated statement for entityId and every entity beneath it, with amounts translated into the parent's currency. When false, only this entity is reported, with no translation. Defaults to false."},"splitBy":{"enum":["month","quarter","year","entity","department","aggregatedDepartment","businessUnit","vendor","customer"],"description":"Adds a further column split to the report, beyond the periods it reports over. Omit for the plain statement with no split. The time splits 'month', 'quarter' and 'year' subdivide the requested periods. The dimension splits break each figure out by that dimension, such as entity, department, business unit, vendor or customer. 'entity' is meaningful only when consolidated is true. 'aggregatedDepartment' rolls the department hierarchy up to its top level, where 'department' keeps each department on its own."}},"additionalProperties":false,"required":["statementId","entityId","bookId","periodIds"]},"bulkDeletePurchaseReturnsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted purchase returns, in the order you sent them. Format: UUID.","examples":[["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeletePurchaseReturnsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the purchase returns you want to delete. Format: UUID. Send at least one.","examples":[["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeleteItemsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted item."}},"additionalProperties":false,"required":["id"]},"description":"The deleted items, in the same order as the input."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteItemsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the items to delete. If any id is unknown, or its item still has stock or history, the whole call fails and nothing is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"voidJournalEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the voided journal entry."}},"additionalProperties":false,"required":["id"]},"voidJournalEntryInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"The reason recorded on the voided entry."}},"additionalProperties":false,"required":["voidReason"]},"getInventoryTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory transaction. Format: UUID.","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The name of the item in `itemId`.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"unitId":{"type":"string","description":"The unique identifier of the unit of measure the inventory transaction was recorded in. Format: UUID. For receipts, shipments, and warehouse transfers, it is the unit on the document line. For inventory increases, inventory decreases, and inventory revaluations, it is the item's stocking unit. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure).","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"type":"string","description":"The code of the unit of measure in `unitId`.","examples":["EA"]},"unitName":{"type":"string","description":"The name of the unit of measure in `unitId`.","examples":["Each"]},"transactionDate":{"type":"string","format":"date","description":"The date the stock came in or went out, or its value changed. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the item's stocking unit. It is 0 when the inventory transaction takes stock out or changes only the value of the stock.","examples":["500.00"]},"outQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction took out of stock, in the item's stocking unit. It is 0 when the inventory transaction brings stock in or changes only the value of the stock.","examples":["0.00"]},"unitInQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit.","examples":["500.00"]},"unitOutQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction took out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item, in the item's stocking unit and in the currency named by `currency`. When stock goes out, it is the item's cost at that time, from its valuation method.","examples":["3.75"]},"totalCost":{"type":"string","format":"decimal","description":"The total cost of the stock that this inventory transaction brought in or took out, in the currency named by `currency`. It is positive whichever way the stock moved, so use `inQuantity` and `outQuantity` to tell the direction. On an inventory revaluation, it is the change in the value of the stock: a positive amount raises the value and a negative amount lowers it.","examples":["1875.00"]},"salesAmount":{"type":"string","format":"decimal","description":"The total selling price of the stock on the shipment line, in the currency named by `currency`. It is the line's unit price multiplied by the quantity. Only inventory transactions created by shipments have it."},"currency":{"type":"string","description":"The currency that `unitCost`, `totalCost`, and `salesAmount` are in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"isReturn":{"type":"boolean","description":"Whether the inventory transaction comes from a sales return or a purchase return, including the inventory transactions created when a return is canceled.","examples":[false]},"isPriceDiff":{"type":"boolean","description":"Whether the inventory transaction changes only the value of stock, without moving any, such as an inventory revaluation or a landed cost.","examples":[false]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the item, warehouse, or unit of measure do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false,"required":["id","itemId","locationId","transactionDate","inQuantity"]},"updateBankAccountOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankAccountInput":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The account's identifier in the system that owns it, for example its IBAN or ACH account number. Must be unique within the tenant. Omit to leave unchanged. The account's own current value is not a collision."},"accountId":{"type":"string","description":"The general-ledger account this bank account posts to. Omit to leave unchanged. See id on GET accounting/accounts/:id."},"financialInstitutionId":{"type":"string","description":"The financial institution holding the account. Omit to leave unchanged. There is no endpoint for it."},"currency":{"type":"string","description":"The account currency. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"type":{"type":"string","description":"The kind of account, as free-form text. For example 'checking' or 'saving'. Omit to leave unchanged.","examples":["savings"]},"reference":{"type":"string","description":"The IBAN or ACH account number. When referenceType is 'QRR' this must be a Swiss QR-IBAN. Omit to leave unchanged."},"referenceType":{"type":"string","description":"How payment references on this account are structured. Accepted values: 'QRR', 'SCOR', 'NON'. Omit to leave unchanged.","examples":["NON"]},"referenceNumber":{"type":"string","description":"A structured creditor reference number for this account. Omit to leave unchanged."},"receivableAccount":{"type":"boolean","description":"Whether the account may receive incoming payments. Omit to leave unchanged.","examples":[true]}},"additionalProperties":false},"updateTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6"]},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'.","examples":["WTO-1044"]},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order.","examples":[1]},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T11:20:04.219Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. updateLines and deleteLines address a line by it."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from. See id on GET inventory/warehouses/:id. Absent while no source warehouse has been resolved, and such a line blocks the conversion."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Always greater than zero."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line is still to be transferred."},"processedQuantity":{"type":"string","format":"decimal","description":"How much of the line a transfer has already taken."},"status":{"type":"string","description":"The state of the line. 'NEEDS_SOURCE' means no source warehouse has been resolved, and the transfer order cannot be converted until it is."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer order as it now stands.","examples":[[{"id":"9a4e2c76-1b38-4f05-8d92-6c7a3e15b204","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"12","inventoryQuantity":"12","openQuantity":"12","status":"NEEDS_SOURCE"}]]}},"additionalProperties":false,"required":["id","documentStatus","lines"]},"updateTransferOrderInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Use format YYYY-MM-DD."},"locationId":{"type":"string","description":"The warehouse the goods leave, for the transfer order as a whole. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to, for the transfer order as a whole. See id on GET inventory/warehouses/:id."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"notes":{"type":"string","description":"Free text on the document."},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse to draw from. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse to deliver to. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line’s unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["itemId","targetLocationId","quantity"]},"description":"The lines to add. The same shape as on create."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The line to change, by the id the transfer order publishes."},"itemId":{"type":"string","description":"A different item to move. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse to draw from. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse to deliver to. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, addressed by the id the transfer order publishes. Everything but the id is optional.","examples":[[{"id":"9a4e2c76-1b38-4f05-8d92-6c7a3e15b204","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The lines to remove, by the id the transfer order publishes. Applied before the updates and creates."}},"additionalProperties":false},"createAccountingSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created sales return."}},"additionalProperties":false,"required":["id"]},"createAccountingSalesReturnInput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order to return against. The order must be partially or fully invoiced. See id on GET accounting/sales-orders/:id."},"returnType":{"type":"string","description":"The resolution path for the return. Accepted values: 'credit', 'replacement'. It cannot be changed once the return moves past 'draft'."},"returnDate":{"type":"string","description":"The transaction date for the return. Use format YYYY-MM-DD."},"reasonCode":{"type":"string","description":"The header-level reason for the return. Accepted values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'."},"lines":{"type":"array","items":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The sales order product line being returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return. It must be above 0 and not exceed what remains returnable on the line."},"reasonCode":{"type":"string","description":"The reason for this line. Accepted values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund for this line, such as a restocking fee, in the sales order's currency. Credit returns only."}},"additionalProperties":false,"required":["salesOrderProductLineId","quantity"]},"description":"The return lines. At least one line with a quantity above 0 is required."},"notes":{"type":"string","description":"Free-form notes for the return."},"shippingRefundAmount":{"type":"string","format":"decimal","description":"The shipping charge to refund to the customer, in the sales order's currency. Credit returns only. Requires shippingSalesOrderProductLineId."},"shippingSalesOrderProductLineId":{"type":"string","description":"The shipping sales order product line whose charge is refunded. Its product has product type 'shipping'."}},"additionalProperties":false,"required":["salesOrderId","returnType","returnDate","lines"]},"deletePurchaseReturnOutput":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Whether the purchase return was deleted. It is always true, because the request fails when the purchase return cannot be deleted.","examples":[true]}},"additionalProperties":false,"required":["deleted"]},"listBookEntityAssignmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entity assignment."},"bookId":{"type":"string","description":"The accounting book this assignment belongs to, the same book named on the path. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The display name of the accounting book."},"entityId":{"type":"string","description":"The legal entity assigned to the book. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the assigned legal entity."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts used for this entity on this book. Absent when none is assigned. See id on GET accounting/chart-of-accounts/:id."},"chartOfAccountsName":{"type":"string","description":"The name of the chart of accounts. Absent when none is assigned."},"fiscalCalendarId":{"type":"string","description":"The fiscal calendar used for this entity on this book. Absent when none is assigned. See id on GET accounting/fiscal-calendars/:id."},"fiscalCalendarName":{"type":"string","description":"The name of the fiscal calendar. Absent when none is assigned."},"currency":{"type":"string","description":"The currency for this entity on this book. Format ISO 4217, for example 'USD'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the entity assignment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","bookId","entityId","lastModifiedDate"]},"description":"The book's entity assignments, one per legal entity that posts to it. An empty array when the book has none."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the page query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more assignments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"getSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you.","examples":["SR-1042"]},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The name of that customer.","examples":["Bakker Retail B.V."]},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line.","examples":["55120"]},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'.","examples":["SalesDelivery"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number.","examples":["RMA-2026-0087"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back.","examples":["3SABCD1234567"]},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency.","examples":["144.00"]},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency.","examples":["0.00"]},"notes":{"type":"string","description":"Free text on the document.","examples":["Customer reports transit damage"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateSalesOrderShipmentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateSalesOrderShipmentInput":{"type":"object","properties":{"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL. Omit to leave unchanged."},"shipmentNumber":{"type":"string","description":"The shipment document number. Omit to leave unchanged."},"carrier":{"type":"string","description":"The name of the carrier handling the shipment. Omit to leave unchanged.","examples":["DHL"]},"incoterm":{"type":"string","description":"The incoterm. For example 'DAP' or 'EXW'. Omit to leave unchanged."},"status":{"enum":["pendingShipment","shipped","cancelled"],"description":"The lifecycle status. Omit to leave unchanged. Setting 'cancelled' soft-cancels the accounting mirror only and leaves the inventory shipment untouched.","examples":["shipped"]},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. Omit to leave unchanged. See id on GET inventory/warehouses/:id."},"shipToContactEmail":{"type":"string","description":"The shipping contact email. Omit to leave unchanged."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer requested delivery. Use format YYYY-MM-DD. Omit to leave unchanged."},"shipDate":{"type":"string","format":"date","description":"The date the shipment was dispatched. Use format YYYY-MM-DD. Omit to leave unchanged."},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment is delivered. Use format YYYY-MM-DD. Omit to leave unchanged."},"createItems":{"type":"array","items":{"type":"object","properties":{"salesOrderProductItemId":{"type":"string","description":"The sales order product item the new shipment line is for. If no product item has this id, the request fails with SALES_ORDER_PRODUCT_ITEMS_NOT_FOUND. See items[].id on GET accounting/sales-orders/:id."},"shippedQty":{"type":"string","format":"decimal","description":"The quantity shipped on the new line, as a count of units."}},"additionalProperties":false,"required":["salesOrderProductItemId","shippedQty"]},"description":"Lines to add to the shipment. Each has no id because the line doesn't exist yet, and its orderedQty is copied from the sales order product item. Omit for no additions."},"updateItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line to change. It must belong to this shipment, or the request fails with SHIPMENT_ITEMS_NOT_FOUND."},"shippedQty":{"type":"string","format":"decimal","description":"The new shipped quantity for the line, as a count of units. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, matched by the line's own id. Omit for no changes.","examples":[[{"id":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","shippedQty":"5"}]]},"deleteItems":{"type":"array","items":{"type":"string"},"description":"The identifiers of the shipment lines to remove. Each must belong to this shipment, or the request fails with SHIPMENT_ITEMS_NOT_FOUND. Omit for no removals."}},"additionalProperties":false},"getWarehouseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the warehouse.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. It is unique within the tenant.","examples":["WH-01"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. See id on GET base/entities.","examples":["81e8beb1-1415-4012-9012-8138580f43dc"]},"entityName":{"type":"string","description":"The name of the legal entity that owns this warehouse.","examples":["Acme GmbH"]},"warehouseTypeId":{"type":"string","description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Absent when the warehouse allows every type. There is no endpoint for it."},"warehouseTypeName":{"type":"string","description":"The name of the warehouse type. Absent when the warehouse allows every document type."},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'.","examples":["Rotterdam Distribution Centre"]},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location.","examples":["WAREHOUSE"]},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. When false, existing stock and history keep pointing at it and new documents cannot select it.","examples":[true]},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse. Open purchase-order on-order quantity for the entity is attributed here for replenishment. At most one warehouse per entity is the primary receiving warehouse.","examples":[true]},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box. Absent when unset.","examples":["Waalhaven 12"]},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor. Absent when unset."},"city":{"type":"string","description":"The city or locality. Absent when unset.","examples":["Rotterdam"]},"stateProvince":{"type":"string","description":"The state, province or region. Absent when unset."},"postalCode":{"type":"string","description":"The postal or ZIP code. Absent when unset.","examples":["3087 BM"]},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. Absent when unset.","examples":["NL"]},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state. Absent when unset.","examples":["Benelux"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the warehouse record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","locationCode","entityId","name","inventoryLocationType","isActive"]},"voidFundTransferOutput":{"type":"object","properties":{},"additionalProperties":false},"voidFundTransferInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"The reason the transfer is being voided. It is stored on the transfer and shown in the audit trail. An empty or whitespace-only value is refused.","examples":["Duplicate of FT-881"]}},"additionalProperties":false,"required":["voidReason"]},"searchInventoryTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory transaction. Format: UUID."},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure the inventory transaction was recorded in. Format: UUID. For receipts, shipments, and warehouse transfers, it is the unit on the document line. For inventory increases, inventory decreases, and inventory revaluations, it is the item's stocking unit. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure in `unitId`."},"unitName":{"type":"string","description":"The name of the unit of measure in `unitId`."},"transactionDate":{"type":"string","format":"date","description":"The date the stock came in or went out, or its value changed. Format: YYYY-MM-DD."},"inQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the item's stocking unit. It is 0 when the inventory transaction takes stock out or changes only the value of the stock."},"outQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction took out of stock, in the item's stocking unit. It is 0 when the inventory transaction brings stock in or changes only the value of the stock."},"unitInQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit."},"unitOutQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction took out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item, in the item's stocking unit and in the currency named by `currency`. When stock goes out, it is the item's cost at that time, from its valuation method."},"totalCost":{"type":"string","format":"decimal","description":"The total cost of the stock that this inventory transaction brought in or took out, in the currency named by `currency`. It is positive whichever way the stock moved, so use `inQuantity` and `outQuantity` to tell the direction. On an inventory revaluation, it is the change in the value of the stock: a positive amount raises the value and a negative amount lowers it."},"salesAmount":{"type":"string","format":"decimal","description":"The total selling price of the stock on the shipment line, in the currency named by `currency`. It is the line's unit price multiplied by the quantity. Only inventory transactions created by shipments have it."},"currency":{"type":"string","description":"The currency that `unitCost`, `totalCost`, and `salesAmount` are in. Format: ISO 4217, for example 'USD'."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from."},"isReturn":{"type":"boolean","description":"Whether the inventory transaction comes from a sales return or a purchase return, including the inventory transactions created when a return is canceled."},"isPriceDiff":{"type":"boolean","description":"Whether the inventory transaction changes only the value of stock, without moving any, such as an inventory revaluation or a landed cost."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the item, warehouse, or unit of measure do not update this field."}},"additionalProperties":false,"required":["id","itemId","locationId","transactionDate","inQuantity"]},"description":"The matching inventory transactions in this response. When more inventory transactions match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-03","inQuantity":"500.00","outQuantity":"0.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryTransactionsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"itemId":{"type":"string","description":"Limits results to inventory transactions for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to inventory transactions for the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"fromDate":{"type":"string","format":"date","description":"Limits results to inventory transactions with a `transactionDate` on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to inventory transactions with a `transactionDate` on or before this date. Format: YYYY-MM-DD."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"Limits results to inventory transactions from this type of document line."},"isReturn":{"type":"boolean","description":"Limits results to inventory transactions from sales returns and purchase returns when true, and to all other inventory transactions when false."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to inventory transactions whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. An inventory transaction must match every filter you send. Send an empty object to return all inventory transactions.","examples":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","fromDate":"2026-08-01","toDate":"2026-08-31"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of inventory transactions per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"updateCreditCardEntryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateCreditCardEntryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the entry is posted under. See id on GET base/entities."},"creditCardAccountId":{"type":"string","description":"The general-ledger account behind the credit card account this entry posts against. See id on GET accounting/accounts/:id."},"transactionDate":{"type":"string","format":"date","description":"The date the transaction took place. Use format YYYY-MM-DD. Changing it re-resolves the posting period."},"currency":{"type":"string","description":"The currency of the entry. Format ISO 4217, for example 'USD'. When supplied it must match the account's currency."},"status":{"type":"string","description":"The reconciliation status. Accepted values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'."},"name":{"type":"string","description":"A short name for the entry.","examples":["February bank fees — revised"]},"description":{"type":"string","description":"A free-form description of the entry."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD."},"origin":{"type":"string","description":"The system or process the entry originated from."},"externalUrl":{"type":"string","description":"A link to the entry in the originating system."},"createLines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage is supplied. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this new line over, one per accounting book. A plain array because the line does not exist yet, so there is nothing to change or remove. Only a prepaid line may carry them."}},"additionalProperties":false,"required":["accountId","amount"]},"description":"Lines to add. Each has the same shape as a line on create, with no id because the line does not exist yet.","examples":[[{"accountId":"9994c3ed-f812-44c1-9454-7f36b2bfb0fb","amount":"-25.00","description":"Wire fee"}]]},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this credit card entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage is supplied. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. For example, 19 means 19%. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book. A book the line already has a schedule for is refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this line, one per accounting book it does not already have one for. Omit all three amortization arrays to leave the line's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the schedule to change. It must be one this line already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by its id and belonging to this line. Every field but the id is optional. Changing the dates without the term, or the term without the dates, is refused with AMORTIZATION_TERM_MISMATCH when the two would disagree."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this line. Each must be one this line already carries. The schedule is deleted, not merely unlinked."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by its id. Every field but the id is optional, and omitting one leaves that field unchanged.","examples":[[{"id":"7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9","amount":"-150.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove. Each must belong to this credit card entry.","examples":[["1f2e3d4c-5b6a-7089-9a8b-7c6d5e4f3a2b"]]}},"additionalProperties":false},"getAccountingPeriodOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this entity-book accounting period row. This identifies the (entity, book, period) combination, not the shared accounting period."},"accountingPeriodId":{"type":"string","description":"The identifier of the underlying accounting period, shared by every entity that uses this fiscal calendar. See id on GET accounting/accounting-periods/:id."},"entityId":{"type":"string","description":"The identifier of the legal entity this status belongs to. See id on GET base/entities. Absent only when the entity-book link is broken."},"entityName":{"type":"string","description":"The name of the legal entity this status belongs to."},"bookId":{"type":"string","description":"The identifier of the accounting book this status belongs to. A period is opened and closed per book. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this status belongs to."},"fiscalCalendarId":{"type":"string","description":"The identifier of the fiscal calendar this period belongs to. See id on GET accounting/fiscal-calendars/:id. Absent when the period was deleted from under its status row."},"fiscalCalendarName":{"type":"string","description":"The name of the fiscal calendar this period belongs to."},"periodName":{"type":"string","description":"The display name of the period as its fiscal calendar defines it, for example 'Jan 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"fiscalYear":{"type":"string","description":"The fiscal year label this period belongs to, for example 'FY2024'. Set by the calendar, so it need not match the calendar year of startDate."},"fiscalQuarter":{"type":"string","description":"The fiscal quarter label this period belongs to, for example 'Q1 2026'."},"startDate":{"type":"string","format":"date","description":"The first day of the period, inclusive. Format YYYY-MM-DD. Absent only when the underlying period was deleted."},"endDate":{"type":"string","format":"date","description":"The last day of the period, inclusive. Format YYYY-MM-DD."},"durationDays":{"type":"number","description":"The number of days the period spans, both bounds inclusive. Absent when startDate or endDate is."},"status":{"type":"string","description":"The status this entity and book have put the period in. Possible values: 'created' (generated, not yet opened), 'open', 'closed', 'reopened'. Only 'open' and 'reopened' accept postings."},"postable":{"type":"boolean","description":"Whether the period currently accepts postings for this entity and book, true when its status is 'open' or 'reopened'. This does not account for journal-type-specific locks."},"postableReason":{"type":"string","description":"Why the period does not accept postings, for example 'status is closed'. Empty when it is postable."},"reopeningReason":{"type":"string","description":"The free-text reason recorded when the period was reopened. Set only when status is 'reopened'."},"reopenedByCascade":{"type":"boolean","description":"Whether this period was reopened as a side effect of reopening a later one, rather than directly."},"hasTransactions":{"type":"boolean","description":"Whether at least one journal entry line has been posted into the underlying period, by any entity."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this status row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It changes when the period is opened, closed or reopened for this entity and book."},"closeTasks":{"type":"array","items":{"type":"object","properties":{"taskCode":{"type":"string","description":"The code identifying the task, and the value to pass as task to POST accounting/period-status/:id/execute-task. The forward tasks, for example 'open', 'close', 'reopen', 'lockAP', 'lockAR', 'lockRevenue', 'lockJournals', 'runRevaluation', 'calculateConsolidationRates'. The task that undoes one is in reverseTaskCode."},"reverseTaskCode":{"type":"string","description":"The code of the task that undoes this one, for example 'unlockAP' for 'lockAP'. Empty when the task cannot be reversed."},"isExecuted":{"type":"boolean","description":"Whether this task has already run for this entity-book period."},"isExecutable":{"type":"boolean","description":"Whether this task can run now. It is false for a task already done and for one whose preconditions are unmet. notExecutableReason says which."},"notExecutableReason":{"type":"string","description":"Why the task cannot run now. Present only when isExecutable is false and a reason is available."},"isReversible":{"type":"boolean","description":"Whether the task that undoes this one can run now."},"notReversibleReason":{"type":"string","description":"Why the reversal cannot run now. Present only when isReversible is false and a reason is available."},"notApplicable":{"type":"boolean","description":"Whether this task does not apply to this entity-book period at all, for example a consolidation task on an entity that does not consolidate. Such a task is neither executed nor executable and does not block the close."},"message":{"type":"string","description":"A human-readable, translated description of the task's state: the applied message when it has run, the not-applied message when it has not, or the not-applicable message when it does not apply."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this task's state last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on a task that has never run."},"lastModifiedBy":{"type":"string","description":"The identifier of the user who last changed this task's state. Absent on a task that has never run."}},"additionalProperties":false,"required":["taskCode","isExecuted","isExecutable","isReversible"]},"description":"The period-close checklist for this entity and book, one entry per task. An empty array when the row has no tasks yet. Check isExecutable before running a task with POST accounting/period-status/:id/execute-task."}},"additionalProperties":false,"required":["id","status","postable","postableReason","lastModifiedDate"]},"getInventoryLevelOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory level.","examples":["0b6d4c93-71ea-4f28-9c05-83a1e7f6204d"]},"itemId":{"type":"string","description":"The unique identifier for the item this level is for. See id on GET inventory/items/:id.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The item's short code.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The item's name.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier for the location this level is at. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The location's short code.","examples":["WH-01"]},"locationName":{"type":"string","description":"The location's name.","examples":["Rotterdam Distribution Centre"]},"onHandQuantity":{"type":"string","format":"decimal","description":"The total physical quantity on hand at this location, in the item's stocking unit of measure.","examples":["1200.00"]},"availableQuantity":{"type":"string","format":"decimal","description":"The quantity free to allocate: onHandQuantity minus allocatedQuantity and reservedQuantity.","examples":["1150.00"]},"allocatedQuantity":{"type":"string","format":"decimal","description":"The quantity allocated to outbound demand.","examples":["50.00"]},"reservedQuantity":{"type":"string","format":"decimal","description":"The quantity reserved."},"inTransitQuantity":{"type":"string","format":"decimal","description":"The quantity in transit to this location."},"damagedQuantity":{"type":"string","format":"decimal","description":"The quantity flagged as damaged."},"qualityHoldQuantity":{"type":"string","format":"decimal","description":"The quantity on quality hold."},"averageCost":{"type":"string","format":"decimal","description":"The moving-average unit cost, in the currency given by currency.","examples":["3.75"]},"onHandValue":{"type":"string","format":"decimal","description":"The value of the stock on hand, in the currency given by currency.","examples":["4500.00"]},"currency":{"type":"string","description":"The currency of averageCost and onHandValue. Format ISO 4217, for example 'EUR'. Absent when the level has no valuation yet.","examples":["EUR"]},"lastTransactionTimestamp":{"type":"string","format":"date-time","description":"The date and time a stock movement last touched this level. Format YYYY-MM-DDTHH:mm:ss. Unlike lastModifiedDate, it changes only when stock moves.","examples":["2026-08-03T11:15:00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory-level record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false,"required":["id","itemId","locationId","availableQuantity"]},"reverseJournalEntryOutput":{"type":"object","properties":{"reversalJournalEntryId":{"type":"string","description":"The unique identifier for the created reversal journal entry."}},"additionalProperties":false,"required":["reversalJournalEntryId"]},"reverseJournalEntryInput":{"type":"object","properties":{"reversalDate":{"type":"string","format":"date","description":"The posting date of the reversal entry. Use format YYYY-MM-DD. It must be on or after the original entry's posting date."},"reversalReason":{"type":"string","description":"The reason for the reversal. Accepted values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'. Any other value fails with INVALID_REVERSAL_REASON."},"reversalDescription":{"type":"string","description":"A free-form reversal description recorded on the original entry's header. Required unless reversalReason is 'other', which fails with REVERSAL_DESCRIPTION_REQUIRED."}},"additionalProperties":false,"required":["reversalDate","reversalReason"]},"getBatchNumberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch number. Format: UUID.","examples":["7a4e91c3-2b58-4d06-9f31-c85e207a4b19"]},"batchNumber":{"type":"string","description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse.","examples":["LOT-2026-0448"]},"manufacturerBatchNumber":{"type":"string","description":"The manufacturer's batch number.","examples":["MFG-8842-C"]},"itemId":{"type":"string","description":"The unique identifier of the item this batch belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse the batch is in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-02"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"quantity":{"type":"string","format":"decimal","description":"The total quantity received into the batch, in the item's stocking unit. When a receipt, inventory increase, or inventory count creates the batch, it is 0 until the document that brings in the stock is committed. For a batch created by a production order, it does not show the quantity received, so use `inStock` instead. Unlike `inStock`, it does not change when stock leaves the batch or comes back on a sales return. Only canceling a receipt, inventory increase, or warehouse transfer that brought stock into the batch lowers it.","examples":["400"]},"inStock":{"type":"string","format":"decimal","description":"The quantity of the batch currently in stock, in the item's stocking unit. It counts all of the batch's stock, whatever its `batchStatus`, so quarantined, expired, and disposed stock are included. To take stock out, create and commit a document that moves it out, such as an inventory decrease.","examples":["260"]},"cost":{"type":"string","format":"decimal","description":"The cost of one unit of the batch. When more stock comes into the batch, the cost becomes the average of the existing and new stock, weighted by quantity.","examples":["12.5"]},"originalCost":{"type":"string","format":"decimal","description":"The cost of one unit of the batch when the stock was first received. Landed costs added later, such as freight or customs duty, raise it, and other revaluations can raise or lower it. When the batch is refilled after running out, it is reset to the new stock's cost.","examples":["12"]},"currency":{"type":"string","description":"The currency of `cost` and `originalCost`. Format: ISO 4217, for example 'USD'.","examples":["GBP"]},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD.","examples":["2027-03-31"]},"manufactureDate":{"type":"string","format":"date","description":"The date the manufacturer made the batch. Format: YYYY-MM-DD."},"bestBeforeDate":{"type":"string","format":"date","description":"The best-before date of the batch. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the batch's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase creates the batch, it is the date entered for the batch on that document, or the document's date when none was entered. When a warehouse transfer creates the batch, it is the `entryDate` of the batch in the sending warehouse. Each later receipt or inventory increase for the batch sets a new date. The age of all the batch's stock is then counted from the new date, including stock received earlier. A warehouse transfer that adds stock to an existing batch does not change the date."},"batchStatus":{"type":"string","description":"The status of the batch. Changing the status does not change the batch's `quantity`, `inStock`, or `cost`. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'.","examples":["ACTIVE"]},"temperatureBreach":{"type":"boolean","description":"Whether the batch has been outside its storage temperature range.","examples":[false]},"qcStatus":{"type":"string","description":"The quality-control status of the batch, as free text."},"active":{"type":"boolean","description":"Whether the batch is active.","examples":[true]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the batch record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the batch record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"updateAccountingProductLineOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingProductLineInput":{"type":"object","properties":{"priceModel":{"type":"string","description":"How the product line is priced. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Omit to leave it unchanged. A value different from the current one fails with VALIDATION_FAILED when the product line has pricing, or when it has a paired 'usage' line (a 'prepaid' line, or a 'recurring' line priced 'thresholdBased')."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"name":{"type":"string","description":"The name of the product line. If you omit name, the current name is replaced with one generated from the product line's lineType."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Accepted values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Accepted values: 'allowNegative', 'overage'. 'allowNegative' lets the balance go negative and takes the shortfall from the new prepaid amount at renewal. 'overage' stops the balance at 0 and invoices further usage at the line's overage rate."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."},"engine":{"type":"string","description":"The tax engine that computes this tax. Accepted values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."}},"additionalProperties":false,"required":["taxCode","entityId","engine"]},"description":"The full set of tax records for the product line. Sending productLineTaxes replaces the whole set, so pass every record that should stay. Send an empty array to remove every record. Omitting productLineTaxes also removes every record. Any update made while your tenant has no tax provider enabled removes every record too."}},"additionalProperties":false},"deleteUnitOfMeasureOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"type":"string","description":"The short code the deleted unit of measure held.","examples":["KG"]}},"additionalProperties":false,"required":["id","unitCode"]},"revenueSchedulingTemplatesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue scheduling template."},"revenueSchedulingTemplateNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The template number, unique within the tenant, for example 'RST-0007'. Absent while none has been assigned."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized under this template. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"revenueSchedulingEvent":{"type":"string","description":"The event that creates a revenue plan under this template. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"amortizationMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the scheduled amount is spread over the plan's periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. Absent when the recognition pattern does not spread revenue over time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue scheduling template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getIntercompanyBillOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the intercompany bill."},"intercompanyBillNumber":{"type":"string","description":"The intercompany bill number. Unique within the tenant. Example: 'ICB-1'."},"name":{"type":"string","description":"The name of the intercompany bill."},"description":{"type":"string","description":"A description of the intercompany bill."},"fromEntityId":{"type":"string","description":"The legal entity that issues the intercompany bill and is owed the amount. See id on GET base/entities."},"fromEntityName":{"type":"string","description":"The name of the issuing legal entity. See entityName on GET base/entities."},"toEntityId":{"type":"string","description":"The legal entity that receives the intercompany bill and is charged for it. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of the receiving legal entity. See entityName on GET base/entities."},"intercompanyProcessId":{"type":"string","description":"The intercompany process whose intercompany receivable and payable accounts balance each legal entity's side of the bill's journal entry. Bills created by a system process that don't name one use the default 'Intercompany Transaction' process. No endpoint returns intercompany processes."},"intercompanyProcessName":{"type":"string","description":"The name of the intercompany process."},"currency":{"type":"string","description":"The currency of the intercompany bill. Every amount on the bill and its lines is in this currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert amounts from the intercompany bill's currency to each legal entity's functional currency. The same rate is used for both legal entities."},"billMarkup":{"type":"string","description":"How markupAmount is applied to the lines. Possible values: 'none' (no markup: markupAmount and each line's markup are 0), 'percentage' (each line's markup is its amount multiplied by markupAmount), 'flatFee' (markupAmount is a total split evenly across the lines)."},"markupAmount":{"type":"string","format":"decimal","description":"The markup on the lines. How to read markupAmount depends on billMarkup. When billMarkup is 'percentage', markupAmount is a decimal fraction of each line's amount, so 0.1 is 10%. When billMarkup is 'flatFee', markupAmount is a total in the intercompany bill's currency, split evenly across the lines and rounded to 2 decimal places, with any remainder on the first line. 0 when billMarkup is 'none'."},"billDate":{"type":"string","format":"date","description":"The date of the intercompany bill. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment term of the intercompany bill. Possible values: 'net30', 'net60', 'net90', 'dueOnReceipt', 'net15', 'custom'."},"dueDate":{"type":"string","format":"date","description":"The date the intercompany bill falls due. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The start date of the service period the intercompany bill covers. Format YYYY-MM-DD."},"status":{"type":"string","description":"The status of the intercompany bill. Possible values: 'draft', 'open', 'partiallySettled', 'settled', 'voided'."},"voidReason":{"type":"string","description":"The reason given when the intercompany bill was voided. Absent when status is not 'voided'."},"type":{"type":"string","description":"How the intercompany bill was created. Possible values: 'manual' (in the application), 'system' (by a system process, such as an allocation run)."},"postingDirection":{"type":"string","description":"The direction of the intercompany bill's journal entry postings. Possible values: 'normal', 'reverse'. When postingDirection is 'reverse', the debit and credit accounts of the intercompany process are swapped."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the intercompany bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"description":{"type":"string","description":"A description of the line."},"amount":{"type":"string","format":"decimal","description":"The amount of the line before markup, in the intercompany bill's currency."},"fromAccountId":{"type":"string","description":"The account the issuing legal entity credits with the line's amount, typically where it records the income or recharge. Markup is credited to the issuing entity's markup account instead. See id on GET accounting/accounts/:id."},"toAccountId":{"type":"string","description":"The account the receiving legal entity debits with the line's amount plus markup, typically where it records the cost or asset. See id on GET accounting/accounts/:id."},"fromValueAllocationId":{"type":"string","description":"The numeric id of the value accounting tags on the issuing legal entity's side, not a UUID. No endpoint returns value accounting tags. Absent when value accounting tags are not in use."},"toValueAllocationId":{"type":"string","description":"The numeric id of the value accounting tags on the receiving legal entity's side, not a UUID. No endpoint returns value accounting tags. Absent when value accounting tags are not in use."},"markupAmount":{"type":"string","format":"decimal","description":"The markup on the line, in the intercompany bill's currency, calculated from the bill's billMarkup and markupAmount."},"fromTaxAmount":{"type":"string","format":"decimal","description":"The tax the issuing legal entity charges on the line (output tax), in the intercompany bill's currency. It is the rate of the issuing entity's tax configuration multiplied by the line's amount plus markup. Absent when no tax applies."},"toTaxAmount":{"type":"string","format":"decimal","description":"The tax the receiving legal entity pays on the line and records as recoverable (input tax), in the intercompany bill's currency. It is the rate of the receiving entity's tax configuration multiplied by the line's amount plus markup. Absent when no tax applies."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the intercompany bill. An empty array when the bill has no lines."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"getFundTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fund transfer."},"fundTransferNumber":{"type":"string","description":"The fund transfer number, for example 'FT-71122'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the fund transfer."},"description":{"type":"string","description":"A free-form description of the transfer."},"transferDate":{"type":"string","format":"date","description":"The date the money moved. Format YYYY-MM-DD."},"transferAmount":{"type":"string","format":"decimal","description":"The amount moved, in the transfer currency."},"currency":{"type":"string","description":"The transfer currency. Format ISO 4217, for example 'USD'. transferAmount is in this currency."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate applied when the two accounts are held in different currencies."},"isVoided":{"type":"boolean","description":"Whether the transfer has been voided. A voided transfer is kept for audit rather than deleted."},"isIntercompany":{"type":"boolean","description":"Whether the transfer moves money between two legal entities rather than between two accounts of one entity. When true, toEntityId names the receiving entity."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this transfer posted to, on GET accounting/journal-entries. Absent until the transfer has posted."},"origin":{"type":"string","description":"The system or process the transfer came from."},"externalUrl":{"type":"string","description":"An absolute http or https link to the source document in an external system."},"externalPaymentId":{"type":"string","description":"The identifier of this payment in the external system that initiated the transfer. It is not unique."},"fromAccountId":{"type":"string","description":"The general-ledger account the money left. See id on GET accounting/accounts/:id."},"fromAccountName":{"type":"string","description":"The name of the account the money left."},"toAccountId":{"type":"string","description":"The general-ledger account the money arrived in. See id on GET accounting/accounts/:id."},"toAccountName":{"type":"string","description":"The name of the account the money arrived in."},"entityId":{"type":"string","description":"The legal entity the transfer is posted under. On an intercompany transfer this is the sending entity. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the transfer is posted under."},"toEntityId":{"type":"string","description":"The receiving legal entity on an intercompany transfer. Absent on a same-entity transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of the receiving legal entity on an intercompany transfer."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fund transfer last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"accountType":{"type":"string","description":"Which side of the transfer this line is. Possible values: 'from', 'to'."},"description":{"type":"string","description":"A free-form description of the line."},"amount":{"type":"string","format":"decimal","description":"The line amount, in the line currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. It differs from the transfer currency only on a cross-currency transfer."},"bankFee":{"type":"string","format":"decimal","description":"The bank fee charged on this side of the transfer, in the line currency."}},"additionalProperties":false,"required":["id","accountType"]},"description":"The two sides of the transfer, one line per side. Read accountType to tell them apart rather than relying on order."}},"additionalProperties":false,"required":["id","transferDate","lastModifiedDate"]},"searchIntercompanyBillsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the intercompany bill."},"intercompanyBillNumber":{"type":"string","description":"The intercompany bill number. Unique within the tenant. Example: 'ICB-1'."},"name":{"type":"string","description":"The name of the intercompany bill."},"description":{"type":"string","description":"A description of the intercompany bill."},"fromEntityId":{"type":"string","description":"The legal entity that issues the intercompany bill and is owed the amount. See id on GET base/entities."},"fromEntityName":{"type":"string","description":"The name of the issuing legal entity. See entityName on GET base/entities."},"toEntityId":{"type":"string","description":"The legal entity that receives the intercompany bill and is charged for it. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of the receiving legal entity. See entityName on GET base/entities."},"intercompanyProcessId":{"type":"string","description":"The intercompany process whose intercompany receivable and payable accounts balance each legal entity's side of the bill's journal entry. Bills created by a system process that don't name one use the default 'Intercompany Transaction' process. No endpoint returns intercompany processes."},"intercompanyProcessName":{"type":"string","description":"The name of the intercompany process."},"currency":{"type":"string","description":"The currency of the intercompany bill. Every amount on the bill and its lines is in this currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert amounts from the intercompany bill's currency to each legal entity's functional currency. The same rate is used for both legal entities."},"billMarkup":{"type":"string","description":"How markupAmount is applied to the lines. Possible values: 'none' (no markup: markupAmount and each line's markup are 0), 'percentage' (each line's markup is its amount multiplied by markupAmount), 'flatFee' (markupAmount is a total split evenly across the lines)."},"markupAmount":{"type":"string","format":"decimal","description":"The markup on the lines. How to read markupAmount depends on billMarkup. When billMarkup is 'percentage', markupAmount is a decimal fraction of each line's amount, so 0.1 is 10%. When billMarkup is 'flatFee', markupAmount is a total in the intercompany bill's currency, split evenly across the lines and rounded to 2 decimal places, with any remainder on the first line. 0 when billMarkup is 'none'."},"billDate":{"type":"string","format":"date","description":"The date of the intercompany bill. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment term of the intercompany bill. Possible values: 'net30', 'net60', 'net90', 'dueOnReceipt', 'net15', 'custom'."},"dueDate":{"type":"string","format":"date","description":"The date the intercompany bill falls due. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The start date of the service period the intercompany bill covers. Format YYYY-MM-DD."},"status":{"type":"string","description":"The status of the intercompany bill. Possible values: 'draft', 'open', 'partiallySettled', 'settled', 'voided'."},"voidReason":{"type":"string","description":"The reason given when the intercompany bill was voided. Absent when status is not 'voided'."},"type":{"type":"string","description":"How the intercompany bill was created. Possible values: 'manual' (in the application), 'system' (by a system process, such as an allocation run)."},"postingDirection":{"type":"string","description":"The direction of the intercompany bill's journal entry postings. Possible values: 'normal', 'reverse'. When postingDirection is 'reverse', the debit and credit accounts of the intercompany process are swapped."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the intercompany bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"description":{"type":"string","description":"A description of the line."},"amount":{"type":"string","format":"decimal","description":"The amount of the line before markup, in the intercompany bill's currency."},"fromAccountId":{"type":"string","description":"The account the issuing legal entity credits with the line's amount, typically where it records the income or recharge. Markup is credited to the issuing entity's markup account instead. See id on GET accounting/accounts/:id."},"toAccountId":{"type":"string","description":"The account the receiving legal entity debits with the line's amount plus markup, typically where it records the cost or asset. See id on GET accounting/accounts/:id."},"fromValueAllocationId":{"type":"string","description":"The numeric id of the value accounting tags on the issuing legal entity's side, not a UUID. No endpoint returns value accounting tags. Absent when value accounting tags are not in use."},"toValueAllocationId":{"type":"string","description":"The numeric id of the value accounting tags on the receiving legal entity's side, not a UUID. No endpoint returns value accounting tags. Absent when value accounting tags are not in use."},"markupAmount":{"type":"string","format":"decimal","description":"The markup on the line, in the intercompany bill's currency, calculated from the bill's billMarkup and markupAmount."},"fromTaxAmount":{"type":"string","format":"decimal","description":"The tax the issuing legal entity charges on the line (output tax), in the intercompany bill's currency. It is the rate of the issuing entity's tax configuration multiplied by the line's amount plus markup. Absent when no tax applies."},"toTaxAmount":{"type":"string","format":"decimal","description":"The tax the receiving legal entity pays on the line and records as recoverable (input tax), in the intercompany bill's currency. It is the rate of the receiving entity's tax configuration multiplied by the line's amount plus markup. Absent when no tax applies."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the intercompany bill. An empty array when the bill has no lines."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The intercompany bills on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more intercompany bills remain after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchIntercompanyBillsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the intercompany bill with this identifier."},"intercompanyBillNumber":{"type":"string","description":"Limits results to the intercompany bill with this intercompany bill number. The match is exact. Example: 'ICB-1'."},"name":{"type":"string","description":"Limits results to intercompany bills whose name contains this text. The match is case-insensitive. A blank value is ignored."},"description":{"type":"string","description":"Limits results to intercompany bills whose description contains this text. The match is case-insensitive. A blank value is ignored."},"fromEntityId":{"type":"string","description":"Limits results to intercompany bills issued by this legal entity. See id on GET base/entities."},"toEntityId":{"type":"string","description":"Limits results to intercompany bills issued to this legal entity. See id on GET base/entities."},"eitherEntityId":{"type":"string","description":"Limits results to intercompany bills where this legal entity is either fromEntityId or toEntityId. See id on GET base/entities."},"status":{"type":"array","items":{"type":"string"},"description":"Limits results to intercompany bills in any of these statuses. Accepted values: 'draft', 'open', 'partiallySettled', 'settled', 'voided'. Any other value matches no intercompany bill."},"type":{"type":"array","items":{"type":"string"},"description":"Limits results to intercompany bills of any of these types. Accepted values: 'manual', 'system'. Any other value matches no intercompany bill."},"billMarkup":{"type":"array","items":{"type":"string"},"description":"Limits results to intercompany bills with any of these markup types. Accepted values: 'none', 'percentage', 'flatFee'. Any other value matches no intercompany bill."},"postingDirection":{"type":"array","items":{"type":"string"},"description":"Limits results to intercompany bills with any of these posting directions. Accepted values: 'normal', 'reverse'. Any other value matches no intercompany bill."},"currency":{"type":"string","description":"Limits results to intercompany bills in this currency. The match is exact. Format ISO 4217, for example 'USD'."},"paymentTerms":{"type":"string","description":"Limits results to intercompany bills with this payment term. Accepted values: 'net30', 'net60', 'net90', 'dueOnReceipt', 'net15', 'custom'. Any other value matches no intercompany bill."},"exchangeRate":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"The inclusive lower bound."},"max":{"type":"string","format":"decimal","description":"The inclusive upper bound."}},"additionalProperties":false,"description":"Limits results to intercompany bills whose exchangeRate is in this range. Omit either bound to leave that side open."},"markupAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"The inclusive lower bound."},"max":{"type":"string","format":"decimal","description":"The inclusive upper bound."}},"additionalProperties":false,"description":"Limits results to intercompany bills whose markupAmount is in this range. Omit either bound to leave that side open."},"billDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to intercompany bills dated in this range. Omit either bound to leave that side open."},"dueDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to intercompany bills falling due in this range. Omit either bound to leave that side open."},"serviceDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to intercompany bills whose serviceDate is in this range. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","format":"date-time","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to intercompany bills last changed in this range. Omit either bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. An intercompany bill must match every filter you send. Omit to return all intercompany bills."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of intercompany bills per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"unapplyPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"unapplyPaymentInput":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to unapply the payment from. See id on GET accounting/invoices/:id."},"amount":{"type":"string","format":"decimal","description":"The amount to unapply from this invoice, in the payment currency. Must be greater than 0."},"unappliedDate":{"type":"string","format":"date","description":"The date the reversal is recognized. Use format YYYY-MM-DD."},"earlyPaymentDiscount":{"type":"string","format":"decimal","description":"The early-payment discount to reverse for this invoice, in the payment currency."},"smallBalanceWriteOffAmount":{"type":"string","format":"decimal","description":"The small-balance write-off amount to reverse for this invoice, in the payment currency."}},"additionalProperties":false,"required":["invoiceId","amount","unappliedDate"]},"description":"The per-invoice amounts to unapply from the payment."}},"additionalProperties":false,"required":["invoices"]},"searchSalesOrderShipmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order shipment."},"salesOrderId":{"type":"string","description":"The sales order this shipment fulfills. See id on GET accounting/sales-orders/:id."},"inventoryShipmentId":{"type":"number","description":"The numeric identifier of the shipment document in inventory, which owns the shipment. Absent only on legacy rows written before the mirroring existed."},"shipmentNumber":{"type":"string","description":"The shipment document number, assigned by inventory. Absent until inventory has issued one."},"status":{"type":"string","description":"The lifecycle status of the shipment. Possible values: 'pendingShipment', 'shipped', 'cancelled'. 'pendingShipment' is drafted in inventory but not yet dispatched, 'shipped' is dispatched, and 'cancelled' means the inventory shipment was deleted and this mirror was soft-canceled."},"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL, when one has been recorded."},"carrier":{"type":"string","description":"The name of the carrier handling the shipment."},"incoterm":{"type":"string","description":"The incoterm governing shipping responsibility for this shipment. For example 'DAP' or 'EXW'."},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. See id on GET inventory/warehouses/:id."},"shipToContactEmail":{"type":"string","description":"The email of the contact who receives this shipment."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer asked for delivery. Format YYYY-MM-DD."},"shipDate":{"type":"string","format":"date","description":"The date the shipment was dispatched. Format YYYY-MM-DD. Absent while the shipment is still pending."},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment was, or is expected to be, delivered. Format YYYY-MM-DD."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line. PATCH matches updateItems and deleteItems on it."},"salesOrderProductItemId":{"type":"string","description":"The sales order product item this shipment line is for. See items[].id on GET accounting/sales-orders/:id."},"shippedQty":{"type":"string","format":"decimal","description":"The quantity shipped on this line, as a count of units."},"orderedQty":{"type":"string","format":"decimal","description":"The total quantity ordered for the sales order product item, as a count of units."},"unshippedQty":{"type":"string","format":"decimal","description":"The quantity still outstanding on this line, as a count of units: orderedQty minus shippedQty."}},"additionalProperties":false,"required":["id","salesOrderProductItemId","shippedQty","orderedQty","unshippedQty"]},"description":"The shipped lines, oldest first. An empty array when the shipment has no lines."}},"additionalProperties":false,"required":["id","salesOrderId","lastModifiedDate","items"]},"description":"The shipments on this page, ordered by ship date with the most recent first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","salesOrderId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","inventoryShipmentId":4242,"shipmentNumber":"SHP-1042","status":"shipped","carrier":"DHL","shipDate":"2026-08-19","lastModifiedDate":"2026-08-20T10:15:00.000Z","items":[]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more shipments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchSalesOrderShipmentsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"Limits results to shipments that fulfill this sales order. See id on GET accounting/sales-orders/:id."},"inventoryShipmentId":{"type":"number","description":"Limits results to the shipment mirroring this inventory shipment, given as its numeric inventory shipment id. At most one shipment matches."},"warehouseId":{"type":"string","description":"Limits results to shipments dispatched from this warehouse location. See id on GET inventory/warehouses/:id."},"status":{"type":"array","items":{"enum":["pendingShipment","shipped","cancelled"]},"description":"Limits results to shipments in any of these states. Omit or pass an empty array to match every state."},"salesOrderProductItemId":{"type":"string","description":"Limits results to shipments for this sales order product item. See items[].id on GET accounting/sales-orders/:id."},"shipmentNumber":{"type":"string","description":"Limits results to shipments whose shipment number contains this text. The match is case-insensitive."},"trackingId":{"type":"string","description":"Limits results to shipments whose tracking number or URL contains this text. The match is case-insensitive."},"carrier":{"type":"string","description":"Limits results to shipments whose carrier name contains this text. The match is case-insensitive."},"incoterm":{"type":"string","description":"Limits results to shipments whose incoterm contains this text. The match is case-insensitive."},"shipToContactEmail":{"type":"string","description":"Limits results to shipments whose shipping contact email contains this text. The match is case-insensitive."},"shipDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest dispatch date to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest dispatch date to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by dispatch date. Both bounds are inclusive. Omit one to leave that side open."},"deliveryDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest delivery date to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest delivery date to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by delivery date. Both bounds are inclusive. Omit one to leave that side open."},"customerRequestDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest requested delivery date to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest requested delivery date to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the date the customer requested delivery. Both bounds are inclusive. Omit one to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The earliest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ in UTC."},"end":{"type":"string","format":"date-time","description":"The latest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ in UTC."}},"additionalProperties":false,"description":"Limits results by last change. Both bounds are inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ in UTC. Omit one to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A shipment must match every filter you send. Omit to return all shipments.","examples":[{"carrier":"dhl","status":["pendingShipment","shipped"]}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of shipments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"creditCardEntriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit card entry."},"creditCardEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The credit card entry number. Absent until one has been assigned."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the credit card entry."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the entry."},"transactionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services were delivered. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reconciliation status of the entry. Possible values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'."},"journalEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A label for the source system the entry was created from."},"creditCardAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the credit card general-ledger account."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the credit card entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"intercompanyBillsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the intercompany bill."},"intercompanyBillNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The intercompany bill number. Unique within the tenant. Example: 'ICB-1'."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the intercompany bill."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the intercompany bill."},"fromEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that issues the intercompany bill and is owed the amount. See id on GET base/entities."},"fromEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the issuing legal entity. See entityName on GET base/entities."},"toEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that receives the intercompany bill and is charged for it. See id on GET base/entities."},"toEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the receiving legal entity. See entityName on GET base/entities."},"intercompanyProcessId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The intercompany process whose intercompany receivable and payable accounts balance each legal entity's side of the bill's journal entry. Bills created by a system process that don't name one use the default 'Intercompany Transaction' process. No endpoint returns intercompany processes."},"intercompanyProcessName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the intercompany process."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the intercompany bill. Every amount on the bill and its lines is in this currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The rate used to convert amounts from the intercompany bill's currency to each legal entity's functional currency. The same rate is used for both legal entities."},"billMarkup":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How markupAmount is applied to the lines. Possible values: 'none' (no markup: markupAmount and each line's markup are 0), 'percentage' (each line's markup is its amount multiplied by markupAmount), 'flatFee' (markupAmount is a total split evenly across the lines)."},"markupAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The markup on the lines. How to read markupAmount depends on billMarkup. When billMarkup is 'percentage', markupAmount is a decimal fraction of each line's amount, so 0.1 is 10%. When billMarkup is 'flatFee', markupAmount is a total in the intercompany bill's currency, split evenly across the lines and rounded to 2 decimal places, with any remainder on the first line. 0 when billMarkup is 'none'."},"billDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the intercompany bill. Format YYYY-MM-DD."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment term of the intercompany bill. Possible values: 'net30', 'net60', 'net90', 'dueOnReceipt', 'net15', 'custom'."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the intercompany bill falls due. Format YYYY-MM-DD."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The start date of the service period the intercompany bill covers. Format YYYY-MM-DD."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the intercompany bill. Possible values: 'draft', 'open', 'partiallySettled', 'settled', 'voided'."},"voidReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason given when the intercompany bill was voided. Absent when status is not 'voided'."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the intercompany bill was created. Possible values: 'manual' (in the application), 'system' (by a system process, such as an allocation run)."},"postingDirection":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The direction of the intercompany bill's journal entry postings. Possible values: 'normal', 'reverse'. When postingDirection is 'reverse', the debit and credit accounts of the intercompany process are swapped."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the intercompany bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteSalesOrderShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted sales order shipment.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"salesOrdersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order."},"orderNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order number. Unique within the tenant. Example: 'SO-1042'."},"orderType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"invoiceStatus":{"anyOf":[{"oneOf":[{"const":"notStarted","description":"Nothing invoiced yet."},{"const":"notStartedOnHold","description":"Nothing invoiced yet, and invoicing is on hold."},{"const":"inProgress","description":"Partly invoiced."},{"const":"inProgressOnHold","description":"Partly invoiced, and invoicing is on hold."},{"const":"complete","description":"Fully invoiced."},{"const":"completeModified","description":"Fully invoiced, and the order was modified since."}]},{"type":"null"}],"description":"How far the order has been invoiced, derived from its invoice plan lines. This is NOT approvalStatus, which says where the order sits in the approval lifecycle: an approved order is usually notStarted, and a fully invoiced one is still approved. Evaluated now, not as of a date."},"bookDate":{"type":"string","format":"date","description":"The date the sales order was booked. Format YYYY-MM-DD."},"signDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the contract was signed by customer and company (YYYY-MM-DD). One of four dates an order carries: bookDate is when it was booked into the system, signDate when it was signed, salesEffectiveDate when the contract legally takes effect, and serviceStartDate when delivery begins. A report about when business was won reads bookDate or signDate; one about when revenue or service starts reads the other two."},"salesEffectiveDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Legal effective date of the contract (YYYY-MM-DD), which can be earlier than signDate: a contract signed in May may take effect retroactively from the previous December."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the order's service period. Format YYYY-MM-DD."},"serviceEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the order's service period. Absent when isEvergreen is true. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'."},"isEvergreen":{"type":"boolean","description":"Whether the order is evergreen, meaning at least one of its subscriptions has no end date and keeps billing until it is canceled."},"isPayAsYouGoOnly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when every line on the order is pay-as-you-go usage, which is why such an order has no fixed term to invoice or recognise on a schedule."},"term":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The length of the order's term, in months. Absent when isEvergreen is true."},"totalContract":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Total contract value in the order currency (see `currency`): the sum of the products' totals less the order-level oneTimeDiscountAmount. Already net of that discount — subtracting it again double-counts it."},"invoicedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount already invoiced against the contract value, in the order currency (see `currency`): the products' invoiced amounts plus every negative invoice line raised against the order, so it is net of credits and can fall as well as rise. totalContract minus invoicedAmount is what remains to be billed."},"oneTimeDiscountAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Lump-sum discount applied to the whole order, in the order currency (see `currency`). Already deducted from totalContract."},"oneTimeDiscountAllocation":{"anyOf":[{"oneOf":[{"const":"firstInvoice","description":"Taken in full on the first invoice."},{"const":"alignToInvoiceFrequency","description":"Spread over the invoices as they are raised."},{"const":"custom","description":"Spread by a custom split."}]},{"type":"null"}],"description":"How the lump-sum discount is spread across the products."},"exchangeRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Rate from the order currency to the legal entity's functional currency, as stored on the order. Absent when no conversion is recorded; the functional figures then carry the order-currency amount unchanged."},"functionalCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity's functional currency as a 3-letter ISO 4217 code — the currency functionalTotalContract and functionalInvoicedAmount are in. The order's own amounts are in `currency` instead."},"functionalTotalContract":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Total contract value in the entity's functional currency (see `functionalCurrency`): totalContract at exchangeRate. Where no exchange rate is stored the order's own amount is carried over unchanged, so a sum across orders can mix converted and unconverted figures — check exchangeRate, or group by currency, before presenting one total across currencies."},"functionalInvoicedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount already invoiced, in the entity's functional currency (see `functionalCurrency`) — the functional twin of invoicedAmount, net of credits in the same way, with the same caution as functionalTotalContract."},"purchaseOrder":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's own purchase-order reference as recorded on the order. Free text — not validated, not unique, absent where the customer issued none. Returned only — it can be neither filtered nor sorted on, because it names a customer-owned document."},"salesChannel":{"anyOf":[{"oneOf":[{"const":"salesAssisted","description":"Sold through the sales team."},{"const":"selfServe","description":"Bought by the customer without a salesperson."}]},{"type":"null"}],"description":"How the order was sold."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer this order is for."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer this order is for. See name on GET accounting/customers/:id."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number of the customer this order is for. See customerNumber on GET accounting/customers/:id. Example: 'CUS-789012'."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that owns the order."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that owns this sales order. See entityName on GET base/entities."},"entityNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the legal entity that owns this sales order. See entityNumber on GET base/entities."},"salesArrangement":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the sales arrangement this order belongs to. No endpoint returns sales arrangements."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to product lines do not update it."}},"additionalProperties":false},"searchAccountOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account."},"accountNumber":{"type":"string","description":"The account number, unique within its chart of accounts."},"accountName":{"type":"string","description":"The display name of the account."},"accountType":{"type":"string","description":"The top-level classification of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'."},"accountSubType":{"type":"string","description":"A finer classification within accountType. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Absent when none is assigned."},"accountStatus":{"type":"string","description":"The lifecycle status of the account. Possible values: 'enabled' (available on transactions), 'disabled' (not available for new transactions), 'draft' (created but not yet reviewed), 'draftErrors' (a draft with validation errors to resolve before it can be enabled)."},"description":{"type":"string","description":"A free-form description of the account. Absent when none was set."},"chartOfAccountsId":{"type":"string","description":"The identifier of the chart of accounts this account belongs to. An account belongs to exactly one. See id on GET accounting/chart-of-accounts/:id."},"parentAccountId":{"type":"string","description":"The identifier of the parent account this account rolls up to. Absent for a top-level account. See id on GET accounting/accounts/:id."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Balances from child accounts aggregate here, and journal entries cannot be posted to it directly."},"entityId":{"type":"string","description":"The identifier of the legal entity this account is denominated for. Set only on bank and credit-card accounts. See id on GET base/entities."},"currency":{"type":"string","description":"The account's currency. Format ISO 4217, for example 'USD'. Set only on accounts linked to a cash account, alongside entityId."},"revaluation":{"type":"boolean","description":"Whether balances on this account are revalued for exchange-rate changes."},"payOnBehalf":{"type":"boolean","description":"Whether this account takes part in pay-on-behalf accounting."},"elimination":{"type":"boolean","description":"Whether this account is eliminated during consolidation."},"exchangeRateType":{"type":"string","description":"Which rate translates this account's amounts on revaluation. Possible values: 'historical', 'average', 'current'. Absent on grouping accounts."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the account record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. It is the fieldName of an existing account external-identifier configuration."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. An empty array when the account has none."}},"additionalProperties":false,"required":["id","accountNumber","accountName","accountType","chartOfAccountsId","groupingAccount","lastModifiedDate"]},"description":"The accounts that match, ordered by account number. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the account with this identifier. The match is exact."},"accountNumber":{"type":"string","description":"Limits results to the account with this number. Pair it with chartOfAccountsId, since the number is unique only within a chart of accounts."},"accountName":{"type":"string","description":"Limits results to accounts whose name contains this text. The match is case-insensitive."},"chartOfAccountsId":{"type":"string","description":"Limits results to accounts in this chart of accounts, by its identifier. An identifier that matches none returns an empty page."},"accountType":{"type":"string","description":"Limits results to accounts of this type. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'. Any other value matches nothing."},"accountSubType":{"type":"string","description":"Limits results to accounts of this sub-type. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Any other value matches nothing."},"accountStatus":{"type":"string","description":"Limits results to accounts with this status. Possible values: 'enabled', 'disabled', 'draft', 'draftErrors'. Any other value matches nothing."},"entityId":{"type":"string","description":"Limits results to accounts denominated for this legal entity, by its identifier. Only bank and credit-card accounts name an entity, so no other sub-type matches. An identifier that matches none returns an empty page."},"groupingAccount":{"type":"boolean","description":"True returns only grouping accounts, false only posting accounts. Omit for both."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. It must be the fieldName of an existing configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system holds it. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to accounts carrying this external identifier. Both fieldName and value are required. Several accounts may share a value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. An account must match every filter you send. Omit to return all accounts."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of accounts per page, between 1 and 200. Defaults to 50. A value outside that range fails with INVALID_PAGE_SIZE rather than being adjusted."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"getUsageOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the usage record."},"usageNumber":{"type":"string","description":"The usage number, unique within the tenant. Absent while none has been assigned."},"usageIdentifier":{"type":"string","description":"The external identifier for this usage record, as supplied at ingestion."},"date":{"type":"string","format":"date-time","description":"The date and time the usage occurred, without a time zone. Format YYYY-MM-DDTHH:mm:ss."},"description":{"type":"string","description":"A free-form description of the usage record. Absent when none is set."},"productIdentifier":{"type":"string","description":"The product code or identifier this usage is attributed to, as supplied at ingestion."},"billableComponentId":{"type":"string","description":"The billable component this usage is attributed to. Absent until it is resolved. There is no endpoint for it."},"usageComponent":{"type":"string","description":"The billable component's name or identifier, included so you do not need a second read."},"quantity":{"type":"string","format":"decimal","description":"The quantity of usage recorded, in unitOfMeasure."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit for this usage. This record has no currency field. The currency is on the subscription or contract this usage bills against."},"status":{"type":"string","description":"The lifecycle status of the usage record. Possible values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'."},"usagePeriodId":{"type":"string","description":"The unique identifier for the usage period this record belongs to. There is no endpoint for it."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"Custom data recorded on this usage record, as a JSON object. Absent when none was set."},"orderIndex":{"type":"number","description":"The position of this usage record within the batch it was created in. Absent when not known."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the usage record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","date","quantity","unitPrice","status","usagePeriodId","lastModifiedDate"]},"getSalesOrderShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order shipment.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"salesOrderId":{"type":"string","description":"The sales order this shipment fulfills. See id on GET accounting/sales-orders/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"inventoryShipmentId":{"type":"number","description":"The numeric identifier of the shipment document in inventory, which owns the shipment. Absent only on legacy rows written before the mirroring existed.","examples":[4242]},"shipmentNumber":{"type":"string","description":"The shipment document number, assigned by inventory. Absent until inventory has issued one.","examples":["SHP-1042"]},"status":{"type":"string","description":"The lifecycle status of the shipment. Possible values: 'pendingShipment', 'shipped', 'cancelled'. 'pendingShipment' is drafted in inventory but not yet dispatched, 'shipped' is dispatched, and 'cancelled' means the inventory shipment was deleted and this mirror was soft-canceled.","examples":["shipped"]},"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL, when one has been recorded.","examples":["1Z999AA10123456784"]},"carrier":{"type":"string","description":"The name of the carrier handling the shipment.","examples":["DHL"]},"incoterm":{"type":"string","description":"The incoterm governing shipping responsibility for this shipment. For example 'DAP' or 'EXW'.","examples":["DAP"]},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. See id on GET inventory/warehouses/:id.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"shipToContactEmail":{"type":"string","description":"The email of the contact who receives this shipment."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer asked for delivery. Format YYYY-MM-DD."},"shipDate":{"type":"string","format":"date","description":"The date the shipment was dispatched. Format YYYY-MM-DD. Absent while the shipment is still pending.","examples":["2026-08-19"]},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment was, or is expected to be, delivered. Format YYYY-MM-DD.","examples":["2026-08-22"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-20T10:15:00.000Z"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line. PATCH matches updateItems and deleteItems on it."},"salesOrderProductItemId":{"type":"string","description":"The sales order product item this shipment line is for. See items[].id on GET accounting/sales-orders/:id."},"shippedQty":{"type":"string","format":"decimal","description":"The quantity shipped on this line, as a count of units."},"orderedQty":{"type":"string","format":"decimal","description":"The total quantity ordered for the sales order product item, as a count of units."},"unshippedQty":{"type":"string","format":"decimal","description":"The quantity still outstanding on this line, as a count of units: orderedQty minus shippedQty."}},"additionalProperties":false,"required":["id","salesOrderProductItemId","shippedQty","orderedQty","unshippedQty"]},"description":"The shipped lines, oldest first. An empty array when the shipment has no lines.","examples":[[{"id":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","salesOrderProductItemId":"7d345a0f-3e6d-4c8e-9b21-9c2a6a10b7f1","shippedQty":"3","orderedQty":"5","unshippedQty":"2"}]]}},"additionalProperties":false,"required":["id","salesOrderId","lastModifiedDate","items"]},"searchSubscriptionOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the subscription."},"subscriptionNumber":{"type":"string","description":"The subscription number. Unique within the tenant. Example: 'SUB-1'."},"customerId":{"type":"string","description":"The customer this subscription belongs to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer this subscription belongs to. See name on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity that owns this subscription. See id on GET base/entities."},"currency":{"type":"string","description":"The currency of annualRecurringRevenue and monthlyRecurringRevenue. Format ISO 4217, for example 'USD'."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The length of the auto-renewal term, in the subscription's term unit."},"renewalPriceChangePercentage":{"type":"string","format":"decimal","description":"The percentage by which the price changes on renewal."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"subscriptionStatus":{"type":"string","description":"The status of the subscription, derived from the status of its lines. Possible values: 'pendingActivation', 'notStarted', 'active', 'pendingOrderApproval', 'canceled', 'suspended'."},"serviceStartDateBasis":{"type":"string","description":"How the service start date is determined. Possible values: 'fixedDate', 'serviceActivation'."},"serviceActivationDate":{"type":"string","format":"date","description":"The date service was activated. Set only when serviceStartDateBasis is 'serviceActivation'. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The latest service end date across all of the subscription's lines. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"submissionDate":{"type":"string","format":"date","description":"The submission date of the sales order this subscription came from. Format YYYY-MM-DD."},"cancellationDate":{"type":"string","format":"date","description":"The date from which the subscription is or will be canceled. Absent when no cancellation has been recorded. Format YYYY-MM-DD."},"cancellationNote":{"type":"string","description":"A note about the cancellation."},"cancellationReason":{"type":"string","description":"The reason code for the cancellation. Possible values: 'noReasonGiven', 'budgetary', 'movingToCompetitors', 'lowCustomerSatisfaction', 'bankruptcy', 'acquisitionMerger'. Absent when the subscription has not been canceled."},"isCancellationEnabled":{"type":"boolean","description":"Whether the cancellation procedure has been applied to this subscription."},"suspensionDate":{"type":"string","format":"date","description":"The date from which the subscription is or will be suspended. Absent when no suspension has been recorded. Format YYYY-MM-DD."},"suspensionNote":{"type":"string","description":"A note about the suspension."},"suspensionReason":{"type":"string","description":"The reason code for the suspension. Possible values: 'unpaidBalance', 'invalidPaymentMethod'. Absent when the subscription has not been suspended."},"isSuspensionEnabled":{"type":"boolean","description":"Whether the suspension process is enabled for this subscription."},"externalSubscriptionId":{"type":"string","description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annual recurring revenue, in the subscription's currency: the sum of annualRecurringRevenue across its active and suspended lines."},"monthlyRecurringRevenue":{"type":"string","format":"decimal","description":"The monthly recurring revenue, in the subscription's currency: the sum of monthlyRecurringRevenue across its active and suspended lines."},"totalUserCount":{"type":"string","format":"decimal","description":"The number of active users or seats across the subscription's active lines."},"prepaidBalance":{"type":"string","format":"decimal","description":"The prepaid balance remaining for this subscription, summed across the prepaid balances linked to it. The balance is a quantity, not a currency amount."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the subscription line (a UUID) — its public identifier."},"subscriptionLineNumber":{"type":"string","description":"Unique, human-readable number of this subscription line. Absent until one has been assigned."},"productName":{"type":"string","description":"Name of the product this line covers."},"quantity":{"type":"string","format":"decimal","description":"Quantity across the line's associated sales order product lines. A count, not a currency amount."},"currency":{"type":"string","description":"ISO 4217 three-letter currency code (e.g. USD, EUR, GBP) governing this line's annualRecurringRevenue and monthlyRecurringRevenue."},"subscriptionLineStatus":{"type":"string","description":"Lifecycle status of this line. A SubscriptionLineStatus member."},"serviceStartDate":{"type":"string","format":"date","description":"Date service starts for this line (YYYY-MM-DD)."},"serviceEndDate":{"type":"string","format":"date","description":"Date service ends for this line (YYYY-MM-DD)."},"customServiceEndDate":{"type":"string","format":"date","description":"Service end date recorded against this line by a subscription update, when one has overridden the derived date (YYYY-MM-DD)."},"maxSalesOrderProductLineServiceEndDate":{"type":"string","format":"date","description":"Latest service end date across this line's sales order product lines (YYYY-MM-DD)."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"Annualized recurring revenue of this line, in the line currency (see this line's `currency`)."},"monthlyRecurringRevenue":{"type":"string","format":"decimal","description":"Monthly recurring revenue of this line, in the line currency (see this line's `currency`)."},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The sales order. See id on GET accounting/sales-orders/:id."},"orderNumber":{"type":"string","description":"The sales order number. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."}},"additionalProperties":false,"required":["id"]},"description":"The sales orders that carry this line, oldest first. An empty array when no sales order carries it."}},"additionalProperties":false,"required":["id","currency","salesOrders"]},"description":"The subscription's lines, one per product on the subscription, oldest first. An empty array when the subscription has none. GET accounting/subscriptions/:id returns the same lines. GET accounting/subscriptions returns header fields only, without lines."},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The sales order. See id on GET accounting/sales-orders/:id."},"orderNumber":{"type":"string","description":"The sales order number. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."}},"additionalProperties":false,"required":["id"]},"description":"The sales orders that carry this subscription, oldest first: the order that created it, then every later upsell, renewal or replacement. An empty array when no sales order carries it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the subscription last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","currency","termType","lines","salesOrders","lastModifiedDate"]},"description":"The subscriptions that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSubscriptionInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the subscription with this identifier. The match is exact."},"subscriptionNumber":{"type":"string","description":"Limits results to the subscription with this subscription number, for example 'SUB-1'. The match is exact."},"customerId":{"type":"string","description":"Limits results to subscriptions of this customer. An id that matches no customer returns an empty page. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"Limits results to subscriptions owned by this legal entity. An id that matches no entity returns an empty page. See id on GET base/entities."},"termType":{"type":"string","description":"Limits results to subscriptions with this term structure. Possible values: 'termed', 'evergreen'. Any other value matches nothing."},"subscriptionStatus":{"type":"string","description":"Limits results to subscriptions in this status. Possible values: 'pendingActivation', 'notStarted', 'active', 'pendingOrderApproval', 'canceled', 'suspended'. Any other value matches nothing."},"autoRenew":{"type":"boolean","description":"Limits results to subscriptions set to auto-renew when true, or not when false."},"cancellationReason":{"type":"string","description":"Limits results to subscriptions canceled for this reason. Possible values: 'noReasonGiven', 'budgetary', 'movingToCompetitors', 'lowCustomerSatisfaction', 'bankruptcy', 'acquisitionMerger'. Any other value matches nothing."},"suspensionReason":{"type":"string","description":"Limits results to subscriptions suspended for this reason. Possible values: 'unpaidBalance', 'invalidPaymentMethod'. Any other value matches nothing."},"externalSubscriptionId":{"type":"string","description":"Limits results to the subscription with this external identifier. The match is exact."},"serviceStartDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest serviceStartDate to include. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest serviceStartDate to include. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to subscriptions whose derived serviceStartDate falls in this range. Both bounds are inclusive, and omitting one leaves that side open."},"serviceEndDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest serviceEndDate to include. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest serviceEndDate to include. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to subscriptions whose derived serviceEndDate falls in this range. Both bounds are inclusive, and omitting one leaves that side open."}},"additionalProperties":false,"description":"The filters to apply. A subscription must match every filter you send. Omit to return all subscriptions you may read."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of subscriptions per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"searchCustomerOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the customer."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"customerNumber":{"type":"string","description":"The customer number. Example: 'CUS-789012'."},"customerType":{"type":"string","description":"The customer type. Possible values: 'default' (a direct customer), 'partner' (a reseller or third-party payer that is invoiced for its end customers), 'endCustomer' (a customer that buys through a partner)."},"partnerType":{"type":"string","description":"The partner type of a customer whose customerType is 'partner'. Possible values: 'reseller', 'thirdPartyPayer'."},"businessType":{"type":"string","description":"The business type of the customer. Possible values: 'company', 'individual'."},"entityId":{"type":"string","description":"The legal entity that invoices this customer."},"entityName":{"type":"string","description":"The name of the legal entity that invoices this customer."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the customer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to."},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax."},"defaultCurrency":{"type":"string","description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code."},"segment":{"type":"string","description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'. Absent when businessType is 'individual'."},"paymentTermLabel":{"type":"string","description":"The display name of the payment term applied to the customer's invoices. See label on GET accounting/payment-terms."},"exemptionNumber":{"type":"string","description":"The tax-exemption certificate number. Absent when taxExempt is false."},"addresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Possible values: 'billTo', 'soldTo'."},"isDefault":{"type":"boolean","description":"Whether this is the customer's default address of its type."},"addressId":{"type":"string","description":"The unique identifier for the address."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","isDefault"]},"description":"The customer's addresses, bill-to entries first, then sold-to. Each entry names its type and whether it is that type's default. An empty array when the customer has no address."},"taxExemptCode":{"type":"string","description":"The tax-exemption reason code."},"salesChannel":{"type":"string","description":"The sales channel for this customer. Possible values: 'salesAssisted' (sold through a salesperson), 'selfServe'."},"additionalContactEmail":{"type":"string","description":"Another email address for the customer, besides invoiceEmail and mainEmail."},"mainContactName":{"type":"string","description":"The name of the customer's main contact."},"preferredLanguage":{"type":"string","description":"The customer's preferred language. Possible values: 'english'."},"crmCustomerId":{"type":"string","description":"The customer's identifier in an external CRM system."},"businessIdentificationNumber":{"type":"string","description":"The customer's business registration number."},"invoiceConsolidation":{"type":"string","description":"How the customer's invoices are consolidated. Possible values: 'customer', 'purchaseOrderNumber', 'salesArrangement'."},"invoiceDeliveryMode":{"type":"string","description":"How invoices are delivered to the customer. Possible values: 'manual', 'automated'."},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether the customer is exempt from credit-card fees."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel and expense items appear on invoices. Possible values: 'detailed', 'consolidated'."},"status":{"type":"string","description":"The status of the customer. Possible values: 'active', 'inactive'."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to the customer's invoices. See code on GET accounting/payment-terms. `paymentTermLabel` is its display name."},"taxRegistrations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"The country the registration applies in, as an ISO 3166-1 code."},"taxNumber":{"type":"string","description":"The tax identification number issued by the tax authority."},"type":{"type":"string","description":"The kind of tax registration. Possible values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'."},"effectiveDate":{"type":"string","description":"The date the registration takes effect. Format YYYY-MM-DD."},"isActive":{"type":"boolean","description":"Whether the registration is active. Only one active registration is allowed per country and tax type."},"note":{"type":"string","description":"An internal note on the registration."},"validationStatus":{"type":"string","description":"The validation state the tax engine assigned."},"validationMessages":{"type":"string","description":"Detail behind the validation state, when the tax engine recorded any."}},"additionalProperties":false,"required":["country","taxNumber","type"]},"description":"The customer's tax registrations. An empty array when the customer has none."},"payment":{"type":"object","properties":{"provider":{"type":"string","description":"The name of the payment provider. Example: 'Stripe'."},"externalCustomerId":{"type":"string","description":"The customer's identifier in the payment provider's system."},"externalPaymentMethodId":{"type":"string","description":"The customer's default payment method in the payment provider's system."}},"additionalProperties":false,"description":"The customer's link to a payment provider. Absent when no provider is linked."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The customer's identifiers in other systems, one per configured field name. An empty array when the customer has none."}},"additionalProperties":false,"required":["id","name","customerNumber","entityId","lastModifiedDate"]},"description":"The customers on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more customers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursors for the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchCustomerInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the customer with this id."},"customerNumber":{"type":"string","description":"Limits results to the customer with this customer number. The match is exact. Example: 'CUS-789012'."},"name":{"type":"string","description":"Limits results to customers whose name contains this text. The match is case-insensitive."},"entityId":{"type":"string","description":"Limits results to customers of this legal entity."},"customerType":{"type":"string","description":"Limits results to customers of this type. Accepted values: 'default', 'partner', 'endCustomer'. Any other value matches no customer."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. A name that is not configured fails with UNKNOWN_EXTERNAL_IDENTIFIER. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to customers that have this external identifier. Several customers can share one value."}},"additionalProperties":false,"description":"The filters to apply. A customer must match every filter you send. Omit to return all customers."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of customers per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"deleteAccountingProductLinePricingOutput":{"type":"object","properties":{},"additionalProperties":false},"bankAccountsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account."},"externalAccountId":{"type":"string","description":"The identifier this account has in the bank or aggregator it was connected from. Unique within the tenant."},"externalAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account name as reported by the bank or aggregator."},"externalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account description as reported by the bank or aggregator."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The kind of account, as free-form text. For example 'checking', 'saving' or 'creditCard'."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the account is held in. Format ISO 4217, for example 'USD'. balance is in this currency."},"balance":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The current account balance, in currency."},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A masked form of the account number, for example '****1234'. Display it instead of reference where the full number is not needed."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full account number, the IBAN or the ACH account number."},"referenceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How referenceNumber is structured. Possible values: 'QRR', 'SCOR', 'NON'. 'QRR' is a Swiss QR reference, 'SCOR' an ISO 11649 creditor reference, and 'NON' none."},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A structured payment reference for payments to this account, interpreted per referenceType."},"bankAccountCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank identifier, the SWIFT/BIC code or the US routing number."},"bankAccountHolderName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name the account is held in. This is personal data."},"paymentAllowed":{"type":"boolean","description":"Whether payments may be made from this account."},"receivableAccount":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this account may be used to receive money."},"payableAccount":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this account may be used to pay money out."},"isReady":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the account is fully set up and usable."},"reconciliationStartDate":{"type":"string","format":"date","description":"The date from which this account is reconciled. Format YYYY-MM-DD. Transactions before it are not reconciled."},"transactionsImportDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date from which transactions are imported for this account. Format YYYY-MM-DD."},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the linked chart-of-accounts account."},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the linked chart-of-accounts account. This is a general-ledger account number, not the bank account number, which is reference."},"bankName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the bank this account is held at."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that owns this account."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bank account last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"listSalesOrderShipmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order shipment."},"salesOrderId":{"type":"string","description":"The sales order this shipment fulfills. See id on GET accounting/sales-orders/:id."},"inventoryShipmentId":{"type":"number","description":"The numeric identifier of the shipment document in inventory, which owns the shipment. Absent only on legacy rows written before the mirroring existed."},"shipmentNumber":{"type":"string","description":"The shipment document number, assigned by inventory. Absent until inventory has issued one."},"status":{"type":"string","description":"The lifecycle status of the shipment. Possible values: 'pendingShipment', 'shipped', 'cancelled'. 'pendingShipment' is drafted in inventory but not yet dispatched, 'shipped' is dispatched, and 'cancelled' means the inventory shipment was deleted and this mirror was soft-canceled."},"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL, when one has been recorded."},"carrier":{"type":"string","description":"The name of the carrier handling the shipment."},"incoterm":{"type":"string","description":"The incoterm governing shipping responsibility for this shipment. For example 'DAP' or 'EXW'."},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. See id on GET inventory/warehouses/:id."},"shipToContactEmail":{"type":"string","description":"The email of the contact who receives this shipment."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer asked for delivery. Format YYYY-MM-DD."},"shipDate":{"type":"string","format":"date","description":"The date the shipment was dispatched. Format YYYY-MM-DD. Absent while the shipment is still pending."},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment was, or is expected to be, delivered. Format YYYY-MM-DD."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line. PATCH matches updateItems and deleteItems on it."},"salesOrderProductItemId":{"type":"string","description":"The sales order product item this shipment line is for. See items[].id on GET accounting/sales-orders/:id."},"shippedQty":{"type":"string","format":"decimal","description":"The quantity shipped on this line, as a count of units."},"orderedQty":{"type":"string","format":"decimal","description":"The total quantity ordered for the sales order product item, as a count of units."},"unshippedQty":{"type":"string","format":"decimal","description":"The quantity still outstanding on this line, as a count of units: orderedQty minus shippedQty."}},"additionalProperties":false,"required":["id","salesOrderProductItemId","shippedQty","orderedQty","unshippedQty"]},"description":"The shipped lines, oldest first. An empty array when the shipment has no lines."}},"additionalProperties":false,"required":["id","salesOrderId","lastModifiedDate","items"]},"description":"The shipments on this page, ordered by ship date with the most recent first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","salesOrderId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","inventoryShipmentId":4242,"shipmentNumber":"SHP-1042","status":"shipped","carrier":"DHL","shipDate":"2026-08-19","lastModifiedDate":"2026-08-20T10:15:00.000Z","items":[{"id":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","salesOrderProductItemId":"7d345a0f-3e6d-4c8e-9b21-9c2a6a10b7f1","shippedQty":"3","orderedQty":"5","unshippedQty":"2"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more shipments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"creditMemosRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo."},"creditMemoNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The credit memo number, for example 'CM-1'. Absent while none has been assigned."},"creditMemoDate":{"type":"string","format":"date","description":"The date the credit memo was issued. Format YYYY-MM-DD."},"creditMemoStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The application status of the credit memo. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'."},"creditMemoType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the credit memo was created. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn'. Only 'manual' credit memos are created through this API. The rest come from internal workflows."},"manualCreditMemoType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason for a manual credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Absent when creditMemoType is not 'manual'."},"currency":{"type":"string","description":"The currency of the credit memo. Every amount on the record, its lines and its application rows is in this currency. Format ISO 4217, for example 'USD'."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the credit memo."},"externalCreditMemoId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this credit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer the credit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer the credit memo is issued to."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number of the customer the credit memo is issued to."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that issued the credit memo. See id on GET base/entities."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that issued the credit memo."},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice the credit memo was created from. Absent when it was not created from an invoice. See id on GET accounting/invoices/:id."},"invoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the invoice the credit memo was created from. Present whenever invoiceId is."},"subtotal":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The subtotal before tax and duties, in the credit memo currency. Absent when no subtotal has been computed."},"totalTax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total tax across all lines, in the credit memo currency."},"totalDutiesAndCustoms":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total duties and customs across all lines, in the credit memo currency."},"totalAmountCredited":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total credited, including tax and duties, in the credit memo currency."},"appliedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount applied to invoices and debit memos so far, in the credit memo currency. This is the net of the application rows below."},"unappliedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount still available to apply, in the credit memo currency."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the credit memo last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateAccountingSalesReturnOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingSalesReturnInput":{"type":"object","properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New free-form notes for the return."},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new header-level reason for the return. Accepted values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'."},"returnTrackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new carrier tracking number for the inbound return shipment."}},"additionalProperties":false},"getAccountingProductOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product."},"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant."},"productNumber":{"type":"string","description":"The product number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"description":{"type":"string","description":"A description of the product shown to customers."},"internalDescription":{"type":"string","description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"type":"string","description":"The product's identifier in an external CRM system."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The date the product is no longer available. Format YYYY-MM-DD. Absent for a product with no end date."},"productFamily":{"type":"string","description":"The product family. Possible values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"The product type. Possible values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"productStatus":{"type":"string","description":"The product's availability status, computed by the system. Possible values: 'draft', 'available', 'unavailable', 'incomplete'. It is derived from the product's lines, pricing and effective dates and cannot be set directly."},"isInventory":{"type":"boolean","description":"Whether the product is tracked as inventory."},"itemIds":{"type":"array","items":{"type":"string"},"description":"The inventory items linked to this product. Used only when isInventory is true. Absent when the product has none. See id on GET inventory/items/:id."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the product record was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug rather than the display label. It must match an active external-identifier configuration for products."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the product has none. This collection is read-only. Create and update do not accept it."}},"additionalProperties":false,"required":["id","productName","productCode","effectiveStartDate","lastModifiedDate"]},"revenueContractsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract."},"revenueContractNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The revenue contract number, unique within the tenant."},"approvalStatus":{"type":"string","description":"The approval status of the contract. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"generalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The overall status of the contract, combining approval and any active revenue hold. Possible values: 'approved', 'approvedOnHold', 'pendingApproval', 'pendingApprovalOnHold'."},"revenueStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The revenue-recognition progress across the contract's lines. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isContractClosed":{"type":"boolean","description":"Whether the contract has been closed, with its open revenue moved to a new combined revenue contract."},"isContractCombined":{"type":"boolean","description":"Whether the contract is the combination target that absorbed a closed contract's open revenue."},"isLongTermContract":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the recognition window from revenueStartDate to revenueEndDate exceeds 366 days."},"currency":{"type":"string","description":"The currency the contract is denominated in. Every amount on the contract is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owning entity's functional currency. Present only when it differs from the contract currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the contract currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that owns this contract."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that owns the contract."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the customer this contract is with."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer the contract belongs to."},"initialSalesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order that opened this contract. An order that amends the contract later is not reachable here."},"migrationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date this contract's opening balances were migrated from a prior system. Format YYYY-MM-DD. Absent on a contract created natively."},"revenueStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The earliest revenue-recognition start date across the contract's lines. Format YYYY-MM-DD."},"revenueEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The latest revenue-recognition end date across the contract's lines. Format YYYY-MM-DD."},"totalContractValue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total contract value, in the contract currency. It is the total price of the sales order this contract was created from, less the contract's cost-of-contract-value."},"deferredRevenue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The deferred revenue not yet recognized, in the contract currency. Zero once the contract is closed."},"revenueRecognized":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cumulative revenue recognized to date, in the contract currency."},"revenueRemaining":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue remaining to be recognized, in the contract currency."},"totalCostOfContractValue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Contracted COST of the contract, in the contract currency (see `currency`): the value of the contract lines carried for cost rather than revenue. totalContractValue already excludes it, so the gross contracted value is the sum of the two. Do not pair it with revenueRecognized, which is a to-date figure."},"costOfRevenueRecognized":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Cost of revenue RECOGNIZED to date, in the contract currency (see `currency`) — the cost counterpart of revenueRecognized, and the one to pair it with for a realised margin. It is 0 on a contract that has recognized nothing, which is a real figure and not a missing one. Unreliable on a combined contract (isContractCombined): there the node fills it with the revenue recognized in the related contracts, not with their cost."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue contract last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getAccountingProductLineOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product line."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"type":"string","description":"The display name of the product. See productName on GET accounting/products/:id."},"productLineNumber":{"type":"string","description":"The product line number, assigned by the system and unique within the tenant. Example: 'PL-1001'."},"name":{"type":"string","description":"The name of the product line."},"lineType":{"type":"string","description":"The type of product line. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"priceModel":{"type":"string","description":"How the product line is priced. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"taxMode":{"type":"string","description":"How the product line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'. Absent if no tax provider was enabled in your tenant when the product line was last saved."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"hasUsage":{"type":"boolean","description":"Whether the product line has a paired 'usage' line. True for 'prepaid' lines, and for 'recurring' lines whose priceModel is 'thresholdBased' or whose commitInvoicing has a value."},"hasBeenUsed":{"type":"boolean","description":"Whether the product line is on at least one sales order."},"commitInvoicing":{"type":"string","description":"When the minimum spend commit of a 'recurring' product line is invoiced. Possible values: 'advance', 'arrears'. Absent when the product line has no minimum spend commit."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative', 'overage'. Applies only when lineType is 'prepaid'."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal. Applies only when lineType is 'prepaid'."},"parentProductLineId":{"type":"string","description":"The product line this 'usage' line is paired with. See id on GET accounting/product-lines/:id. Absent when the product line is not a paired 'usage' line."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the product line was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product line last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax record."},"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"engine":{"type":"string","description":"The tax engine that computes this tax. Possible values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."}},"additionalProperties":false,"required":["id","taxCode","engine"]},"description":"The tax records of the product line. Absent when the product line has none."},"pricingHeaders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header. See id on GET accounting/pricing/:id."},"headerNumber":{"type":"string","description":"The pricing header number, assigned by the system and unique within the tenant."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book entry."},"priceBookEntryNumber":{"type":"string","description":"The price book entry number, assigned by the system."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. On a rate-card entry, the list price is the rate."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Used only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Absent on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"rateCardEntry":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Absent when no price model was set on the rate-card entry."}},"additionalProperties":false,"required":["id","unitOfMeasure"],"description":"The rate-card entry attached to this price book entry. Absent when the entry is not rate-card priced."}},"additionalProperties":false,"required":["id"]},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["id","currency","validFrom","priceBookEntries"]},"description":"The pricing headers of the product line, each with its price book entries. Absent when the product line has no pricing."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the product line has none."}},"additionalProperties":false,"required":["id","productId","name","lastModifiedDate"]},"updatePriceBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the updated price book."}},"additionalProperties":false,"required":["id"]},"updatePriceBookInput":{"type":"object","properties":{"priceBookName":{"type":"string","description":"A new display name. Omit to leave it unchanged. It must stay unique within the tenant, compared case-insensitively. The price book's own current name is not a collision."},"active":{"type":"boolean","description":"A new active flag. Omit to leave it unchanged."},"description":{"type":"string","description":"A new description. Omit to leave it unchanged."},"dataSource":{"type":"string","description":"A new data source. Omit to leave it unchanged."}},"additionalProperties":false},"importInvoicesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The ids of the invoices recorded, one per requested entry and in the same order. Read each back with GET accounting/invoices/:id.","examples":[["f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"]]}},"additionalProperties":false,"required":["ids"]},"importInvoicesInput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order these invoices bill. It must be flagged for externalized billing. One whose billing is scheduled in this system is refused with SALES_ORDER_NOT_EXTERNALISED. See id on GET accounting/sales-orders/:id.","examples":["8c1f4a92-3e77-4d21-9b05-6a2f1c8e4d33"]},"invoices":{"type":"array","items":{"type":"object","properties":{"externalInvoiceId":{"type":"string","description":"The id of this invoice in the source system, stamped on the created invoice for reconciliation."},"invoiceDate":{"type":"string","format":"date","description":"The date to stamp on this invoice. Format YYYY-MM-DD."},"lines":{"type":"array","items":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The unique identifier for the sales-order product line this invoice line bills against. There is no endpoint that returns a single sales-order product line."},"plannedDate":{"type":"string","format":"date","description":"The planned billing date of the target invoice-plan line. Format YYYY-MM-DD. When no plan line exists for this date and the schedule is still open, one is created using this as both its service start date and its invoice date."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period, for a plan line created on an open schedule. Format YYYY-MM-DD. Ignored when the line matches an existing plan line."},"totalPrice":{"type":"string","format":"decimal","description":"The pre-tax line total, in the sales order's currency. It must match the resolved plan line's total price. Any one-time discount must already be netted in."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs charged on this line, in the sales order's currency. Requires the entity's Duties and Customs feature to be enabled."},"taxAmount":{"type":"string","format":"decimal","description":"The total tax on this line, in the sales order's currency. When given, it must equal the sum of taxLines[].amount. When omitted, it is computed from that sum."},"taxCode":{"type":"string","description":"The line-level tax code, as the source tax engine issued it."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD. Typically the service end date or the invoice date."},"taxExemptCode":{"type":"string","description":"The exempt code applied to this line."},"exceptionNumber":{"type":"string","description":"The exception number for the tax exemption, as the source tax engine issued it."},"taxMode":{"enum":["TaxInclusive","TaxExclusive"],"description":"Whether totalPrice already includes tax."},"taxLines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the tax as it should appear on the document, for example 'CA Sales Tax' or 'VAT'."},"amount":{"type":"string","format":"decimal","description":"The tax amount for this jurisdiction, in the sales order's currency."},"rate":{"type":"string","format":"decimal","description":"The tax rate as a decimal fraction. For example, 0.21 is 21%. A rate, not an amount, so it has no currency."},"taxableAmount":{"type":"string","format":"decimal","description":"The pre-tax amount the rate was applied to, in the sales order's currency."},"exemptAmount":{"type":"string","format":"decimal","description":"The portion of the taxable base that was exempted, in the sales order's currency."},"taxType":{"type":"string","description":"The engine classification of the tax, for example 'Sales' or 'VAT'."},"rateType":{"type":"string","description":"The VAT rate classification, for example 'Standard', 'Reduced' or 'Zero'."},"vatCode":{"type":"string","description":"The VAT code for this jurisdiction."},"isItemTaxable":{"type":"boolean","description":"Whether the item is taxable in this jurisdiction."},"taxTreatment":{"enum":["salesTax","domesticStandardRate","domesticReducedRate","domesticSalesZeroRated","domesticSalesExempt","vatIntraEuStandardRate","vatIntraEuReducedRate","nonEuExempt","reverseCharge"],"description":"The VAT treatment for this jurisdiction. When supplied, the built-in VAT determination is bypassed."}},"additionalProperties":false,"required":["name","amount"]},"description":"The per-jurisdiction tax for this line. You supply it, because no tax engine is called on this path. Send an empty array for a tax-exempt line."}},"additionalProperties":false,"required":["salesOrderProductLineId","plannedDate","totalPrice","taxLines"]},"description":"The lines of this invoice. Each resolves to one invoice-plan line by salesOrderProductLineId and plannedDate."}},"additionalProperties":false,"required":["invoiceDate","lines"]},"description":"The invoices to record, one entry each, exactly as the source system grouped them. Every entry yields one invoice, and the ids come back in this order.","examples":[[{"externalInvoiceId":"NS-INV-88213","invoiceDate":"2026-09-01","lines":[{"salesOrderProductLineId":"b2d7f309-6c14-4a85-9f37-0e8c5d1b7a26","plannedDate":"2026-09-01","serviceEndDate":"2026-09-30","totalPrice":"1000.00","taxAmount":"210.00","taxCode":"NL-VAT-STD","taxMode":"TaxExclusive","taxLines":[{"name":"NL VAT","amount":"210.00","rate":"0.21","taxableAmount":"1000.00","taxType":"VAT","rateType":"Standard","taxTreatment":"domesticStandardRate"}]}]}]]}},"additionalProperties":false,"required":["salesOrderId","invoices"]},"modifySubscriptionOutput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"Id of the generated sales order (a UUID). Absent when a midTermModification payload contains only cancellations (no sales order is created)."},"subscriptionModificationId":{"type":"string","description":"Id of the created SubscriptionModification record (a UUID). Absent for renewal (a renewal creates no SubscriptionModification)."},"approvalStatus":{"type":"string","description":"Approval status of the result (pendingApproval, approved)"},"serviceStartDate":{"type":"string","format":"date","description":"renew and earlyRenew only: service start date of the new term (the day after the current service end date for renew, the modificationDate for earlyRenew)"},"serviceEndDate":{"type":"string","format":"date","description":"renew and earlyRenew only: service end date of the new term"},"term":{"type":"number","description":"renew and earlyRenew only: renewal term in months that was applied"}},"additionalProperties":false,"required":["approvalStatus"]},"modifySubscriptionInput":{"type":"object","properties":{"customerId":{"type":"string","description":"[fk: CustomerApi.customers.id] Id of the customer owning the subscription being modified (a UUID). The subscription must belong to this customer."},"externalOrderId":{"type":"string","description":"Idempotency key assigned by the upstream system (e.g. CPQ order id). When the tenant has a SalesOrderExternalIdentifierConfiguration for fieldName externalOrderId, the value is stamped on the generated sales order and a resubmission is rejected with DUPLICATE_EXTERNAL_ORDER_ID; without that configuration duplicates are not detected."},"modificationType":{"enum":["midTermModification","renew","earlyRenew"],"description":"Discriminator for the kind of modification. midTermModification applies the line arrays (addLines/changeLines/cancelLines/replaceGroups) on the modificationDate. renew renews the whole subscription: it carries term/priceChangePercentage and must omit the line arrays and modificationDate. earlyRenew renews the whole subscription early: same shape as renew plus the required modificationDate."},"bookDate":{"type":"string","format":"date","description":"Booking date for the generated sales order (ISO 8601, YYYY-MM-DD). Defaults to today for midTermModification and earlyRenew, and to the renewal service start date for renew."},"effectiveDate":{"type":"string","format":"date","description":"Sales effective date stamped on the generated sales order (ISO 8601, YYYY-MM-DD). Defaults to the modificationDate. Not supported for renewal payloads."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"Order-level one-time discount amount in the subscription currency. Not supported for renewal payloads."},"oneTimeDiscountAllocation":{"enum":["firstInvoice","alignToInvoiceFrequency"],"description":"How the one-time discount is allocated across invoices (firstInvoice, alignToInvoiceFrequency). Not supported for renewal payloads."},"billToAddressId":{"type":"string","description":"[fk: CustomerApi.customers.addresses.id] Bill-to address for the generated sales order (a UUID). Must belong to the customer. Defaults to the originating order's bill-to address. Not supported for renewal payloads."},"soldToAddressId":{"type":"string","description":"[fk: CustomerApi.customers.addresses.id] Sold-to address for the generated sales order (a UUID). Must belong to the customer. Defaults to the originating order's sold-to address. Not supported for renewal payloads."},"signDate":{"type":"string","format":"date","description":"Date the modification was signed/agreed upstream (ISO 8601, YYYY-MM-DD)"},"purchaseOrder":{"type":"string","description":"Customer purchase order reference"},"opportunityId":{"type":"string","description":"Upstream opportunity identifier (e.g. Salesforce opportunity id)"},"opportunityName":{"type":"string","description":"Upstream opportunity name"},"approvalStatus":{"enum":["pendingApproval","approved"],"description":"Approval status of the generated sales order. Authoritative upstream systems may pass approved to apply the modification without manual approval. Defaults to pendingApproval."},"externalizedCalculations":{"type":"boolean","description":"midTermModification only. When true, the caller owns line totals: every addLines entry (top-level and in replaceGroups) and every rampDeal ramp must carry totalPrice (TOTAL_PRICE_REQUIRED), every changeLines entry must carry totalPrice for its added quantity (CHANGE_LINE_TOTAL_PRICE_REQUIRED) and may not target a ramp line (EXTERNALIZED_RAMP_CHANGE_NOT_SUPPORTED), the value is stored as given, and Everest does not recalculate it. Defaults to false, where totals are calculated by Everest and any totalPrice is ignored."},"modificationDate":{"type":"string","format":"date","description":"Effective date of the modification (ISO 8601, YYYY-MM-DD). Required for midTermModification: service changes take effect on this date and it must fall within the subscription service period. Required for earlyRenew: the new term starts on this date, which must be after the current term's start date and no later than the service end date. Must be omitted for renew (the renewal starts the day after the current service end date)."},"term":{"type":"number","description":"renew and earlyRenew only: renewal term in months. Defaults to the subscription's configured auto-renewal term; when neither is set a renewal is rejected with RENEWAL_TERM_MISSING."},"priceChangePercentage":{"type":"string","format":"decimal","description":"renew and earlyRenew only: fractional price increase applied to the list and unit prices of every renewed line (0.05 = 5% increase; tiered lines keep their prices). Defaults to the subscription's configured auto-renewal price increase. Negative values are rejected."},"note":{"type":"string","description":"Free-text note. Recorded on the SubscriptionModification for midTermModification and on the renewal sales order for renew/earlyRenew."},"addLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"[fk: ProductLineApi.productLines.id] Id of the product line defining pricing and billing rules (a UUID)"},"quantity":{"type":"string","format":"decimal","description":"Quantity of the product. Optional when (a) the line type sources quantity from usage records or external capture, or (b) rampDeal is provided (each ramp period carries its own quantity)."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce"],"description":"Invoice frequency. Defaults to product line setting."},"invoiceTiming":{"enum":["advance","arrears"],"description":"Invoice timing relative to service period (advance, arrears). Defaults to entity policy."},"lineInvoiceDay":{"type":"string","description":"Specific day for generating invoices. Defaults to entity policy."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"Pricing model. Defaults to product line setting."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case"],"description":"Unit of measure (instance, gigabyte, terabyte, user, seat, minute, hour, day, month, each, license, activeUser, megabyte, message, text, platform, employee, personnel, credit, currency, package, case). Defaults to product line setting."},"listPrice":{"type":"string","format":"decimal","description":"Standard list price before discounts. Defaults to unitPrice when omitted; must be omitted when the product line has enforceListPrice set."},"unitPrice":{"type":"string","format":"decimal","description":"Actual unit price after applying discounts. Required unless rampDeal is provided."},"totalPrice":{"type":"string","format":"decimal","description":"Total price of the added line, stored as given. Required when externalizedCalculations is true unless rampDeal is provided (each ramp then carries its own totalPrice); ignored otherwise."},"altProductName":{"type":"string","description":"Alternative product name stored on the created sales order product. Passed through as given."},"discount":{"type":"string","format":"decimal","description":"Discount value (interpreted based on discountType)"},"discountType":{"enum":["amount","percentage"],"description":"Discount type (amount, percentage)"},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"Pricing term period. Defaults to product line setting."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of quantity range (inclusive). First tier must start at 0."},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of quantity range (inclusive). Omit on the last tier for open-ended ranges."},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit price for quantities in this tier after discount"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price before discount. Defaults to unitPrice."},"priceModel":{"enum":["flat","perUnit"],"description":"Per-tier price model (flat, perUnit). Defaults to perUnit."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"Pricing tiers for tiered/volume/stairstep price models. Tiers must cover contiguous quantity ranges starting at 0; bounds are inclusive and each tier's fromQuantity must be exactly the previous tier's toQuantity + 1 (e.g. 0-100, 101-500, 501-open)."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"BillableComponent identifier for this meter"},"description":{"type":"string","description":"Free-text description of the rate card entry"},"unitOfMeasure":{"type":"string","description":"Unit of measure for this meter"},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit rate negotiated for this modification"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price. Honored only when product line enforceListPrice is false."},"conversion":{"type":"string","format":"decimal","description":"Conversion factor between billable and reporting units"}},"additionalProperties":false,"required":["identifier","unitOfMeasure","unitPrice"]},"description":"Rate card entries for this product line. Required when priceModel is rateCard and the product line has no template entries."},"rampDeal":{"type":"object","properties":{"interval":{"enum":["annually","specificDates"],"description":"How ramps are defined. annually = auto-derive yearly ramps; specificDates = caller provides explicit serviceStartDate/serviceEndDate per ramp."},"invoiceTiming":{"enum":["perInterval","allAtOnce"],"description":"perInterval invoices at each ramp start; allAtOnce invoices the whole deal upfront and requires every ramp invoiceFrequency = allAtOnce."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"Ramp service start date (ISO 8601, YYYY-MM-DD). Required for specificDates; omit for annually."},"serviceEndDate":{"type":"string","format":"date","description":"Ramp service end date (ISO 8601, YYYY-MM-DD). Required for specificDates; omit for annually."},"quantity":{"type":"string","format":"decimal","description":"Quantity for this ramp"},"listPrice":{"type":"string","format":"decimal","description":"Ramp list price. Defaults to the ramp unitPrice when omitted; must be omitted when the product line has enforceListPrice set."},"unitPrice":{"type":"string","format":"decimal","description":"Ramp unit price after discount"},"totalPrice":{"type":"string","format":"decimal","description":"Total price of this ramp period, stored as given. Required when externalizedCalculations is true; ignored otherwise."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce"],"description":"Ramp invoice frequency. Must be allAtOnce on every ramp when invoiceTiming is allAtOnce."}},"additionalProperties":false,"required":["quantity","unitPrice"]},"description":"One entry per ramp, in chronological order. Minimum 2 ramps."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Ramp deal definition for phased additions. Mutually exclusive with top-level quantity/unitPrice."},"serviceStartDate":{"type":"string","format":"date","description":"Service start date of the added product (ISO 8601, YYYY-MM-DD). Defaults to the modificationDate."},"serviceEndDate":{"type":"string","format":"date","description":"Service end date of the added product (ISO 8601, YYYY-MM-DD). Defaults to coterminous with the subscription."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"Field name defined in the corresponding ExternalIdentifierConfiguration"},"value":{"type":"string","description":"External identifier value"},"externalUrl":{"type":"string","description":"Optional link to record in originating system"}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to attach, e.g. from NetSuite or Salesforce"}},"additionalProperties":false,"required":["productLineId"]},"description":"New products to add to the subscription. Same pricing surface as SalesOrderApi.create subscription products (tiers, rate cards, ramp deals)."},"changeLines":{"type":"array","items":{"type":"object","properties":{"subscriptionLineId":{"type":"string","description":"Id of the subscription line being changed (a UUID)"},"newQuantity":{"type":"string","format":"decimal","description":"New total quantity for the line (not the delta). v1 supports increases only."},"unitPrice":{"type":"string","format":"decimal","description":"Unit price for the added quantity when newQuantity is provided; defaults to the line's current unit price. This prices the delta only — use newUnitPrice to reprice the whole line."},"totalPrice":{"type":"string","format":"decimal","description":"Total price of the added quantity, stored as given on the delta line. Required when externalizedCalculations is true, where the line must not be a ramp line; ignored otherwise."},"newUnitPrice":{"type":"string","format":"decimal","description":"New unit price for the whole line from the modification date (reprice without quantity movement). Reserved: rejected with CHANGE_KIND_NOT_SUPPORTED until reprice ships."},"newListPrice":{"type":"string","format":"decimal","description":"New list price for the whole line. Only valid together with newUnitPrice; must be omitted when the product line has enforceListPrice set. Reserved: rejected with CHANGE_KIND_NOT_SUPPORTED until reprice ships."},"newDiscount":{"type":"string","format":"decimal","description":"New discount value for the line, interpreted based on newDiscountType. Reserved: rejected with CHANGE_KIND_NOT_SUPPORTED until reprice ships."},"newDiscountType":{"enum":["amount","percentage"],"description":"How newDiscount is interpreted (amount, percentage). Required when newDiscount is provided."},"newTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of quantity range (inclusive). First tier must start at 0."},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of quantity range (inclusive). Omit on the last tier for open-ended ranges."},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit price for quantities in this tier after discount"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price before discount. Defaults to unitPrice."},"priceModel":{"enum":["flat","perUnit"],"description":"Per-tier price model (flat, perUnit). Defaults to perUnit."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"Replacement tier table for a tier/volume/stairstep priced line; same shape and rules as addLines.tiers. May be combined with newQuantity. Reserved: rejected with CHANGE_KIND_NOT_SUPPORTED until reprice ships."}},"additionalProperties":false,"required":["subscriptionLineId"]},"description":"Changes to existing subscription lines: quantity, price, discount, and tier changes. Every entry must carry at least one change field (CHANGE_LINE_NO_CHANGES). v1 implements quantity increases only: a decrease is rejected with QUANTITY_DECREASE_NOT_SUPPORTED (model a downgrade as a replaceGroup); tier/volume/stairstep and rate-card priced lines are supported, but flat-priced and usage-type lines are rejected with CHANGE_QUANTITY_UNSUPPORTED_LINE_TYPE. Price, discount, and tier changes (newUnitPrice, newListPrice, newDiscount, newDiscountType, newTiers) are reserved and rejected with CHANGE_KIND_NOT_SUPPORTED."},"cancelLines":{"type":"array","items":{"type":"object","properties":{"subscriptionLineId":{"type":"string","description":"Id of the subscription line to cancel (a UUID)"},"serviceEndDate":{"type":"string","format":"date","description":"Service end date (ISO 8601, YYYY-MM-DD). Defaults to the modificationDate; in v1 a differing value is rejected (service always ends on the modificationDate)."}},"additionalProperties":false,"required":["subscriptionLineId"]},"description":"Partial cancellations of existing subscription lines"},"replaceGroups":{"type":"array","items":{"type":"object","properties":{"cancelLines":{"type":"array","items":{"type":"object","properties":{"subscriptionLineId":{"type":"string","description":"Id of the subscription line being replaced (a UUID)"}},"additionalProperties":false,"required":["subscriptionLineId"]},"description":"Existing subscription lines this group replaces. Their service ends on the group's service start date; no per-line serviceEndDate can be provided."},"addLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"[fk: ProductLineApi.productLines.id] Id of the product line defining pricing and billing rules (a UUID)"},"quantity":{"type":"string","format":"decimal","description":"Quantity of the product. Optional when (a) the line type sources quantity from usage records or external capture, or (b) rampDeal is provided (each ramp period carries its own quantity)."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce"],"description":"Invoice frequency. Defaults to product line setting."},"invoiceTiming":{"enum":["advance","arrears"],"description":"Invoice timing relative to service period (advance, arrears). Defaults to entity policy."},"lineInvoiceDay":{"type":"string","description":"Specific day for generating invoices. Defaults to entity policy."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"Pricing model. Defaults to product line setting."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case"],"description":"Unit of measure (instance, gigabyte, terabyte, user, seat, minute, hour, day, month, each, license, activeUser, megabyte, message, text, platform, employee, personnel, credit, currency, package, case). Defaults to product line setting."},"listPrice":{"type":"string","format":"decimal","description":"Standard list price before discounts. Defaults to unitPrice when omitted; must be omitted when the product line has enforceListPrice set."},"unitPrice":{"type":"string","format":"decimal","description":"Actual unit price after applying discounts. Required unless rampDeal is provided."},"totalPrice":{"type":"string","format":"decimal","description":"Total price of the added line, stored as given. Required when externalizedCalculations is true; ignored otherwise."},"altProductName":{"type":"string","description":"Alternative product name stored on the created sales order product. Passed through as given."},"discount":{"type":"string","format":"decimal","description":"Discount value (interpreted based on discountType)"},"discountType":{"enum":["amount","percentage"],"description":"Discount type (amount, percentage)"},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"Pricing term period. Defaults to product line setting."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of quantity range (inclusive). First tier must start at 0."},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of quantity range (inclusive). Omit on the last tier for open-ended ranges."},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit price for quantities in this tier after discount"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price before discount. Defaults to unitPrice."},"priceModel":{"enum":["flat","perUnit"],"description":"Per-tier price model (flat, perUnit). Defaults to perUnit."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"Pricing tiers for tiered/volume/stairstep price models. Tiers must cover contiguous quantity ranges starting at 0; bounds are inclusive and each tier's fromQuantity must be exactly the previous tier's toQuantity + 1 (e.g. 0-100, 101-500, 501-open)."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"BillableComponent identifier for this meter"},"description":{"type":"string","description":"Free-text description of the rate card entry"},"unitOfMeasure":{"type":"string","description":"Unit of measure for this meter"},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit rate negotiated for this modification"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price. Honored only when product line enforceListPrice is false."},"conversion":{"type":"string","format":"decimal","description":"Conversion factor between billable and reporting units"}},"additionalProperties":false,"required":["identifier","unitOfMeasure","unitPrice"]},"description":"Rate card entries for this product line. Required when priceModel is rateCard and the product line has no template entries."},"rampDeal":{"type":"object","properties":{"interval":{"enum":["annually","specificDates"],"description":"How ramps are defined. annually = auto-derive yearly ramps; specificDates = caller provides explicit serviceStartDate/serviceEndDate per ramp."},"invoiceTiming":{"enum":["perInterval","allAtOnce"],"description":"perInterval invoices at each ramp start; allAtOnce invoices the whole deal upfront and requires every ramp invoiceFrequency = allAtOnce."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"Ramp service start date (ISO 8601, YYYY-MM-DD). Required for specificDates; omit for annually."},"serviceEndDate":{"type":"string","format":"date","description":"Ramp service end date (ISO 8601, YYYY-MM-DD). Required for specificDates; omit for annually."},"quantity":{"type":"string","format":"decimal","description":"Quantity for this ramp"},"listPrice":{"type":"string","format":"decimal","description":"Ramp list price. Defaults to the ramp unitPrice when omitted; must be omitted when the product line has enforceListPrice set."},"unitPrice":{"type":"string","format":"decimal","description":"Ramp unit price after discount"},"totalPrice":{"type":"string","format":"decimal","description":"Total price of this ramp period, stored as given. Required when externalizedCalculations is true; ignored otherwise."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce"],"description":"Ramp invoice frequency. Must be allAtOnce on every ramp when invoiceTiming is allAtOnce."}},"additionalProperties":false,"required":["quantity","unitPrice"]},"description":"One entry per ramp, in chronological order. Minimum 2 ramps."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Ramp deal definition for phased additions. Mutually exclusive with top-level quantity/unitPrice."},"serviceStartDate":{"type":"string","format":"date","description":"Service start date of the added product = the group's activation date (ISO 8601, YYYY-MM-DD). Defaults to the modificationDate."},"serviceEndDate":{"type":"string","format":"date","description":"Service end date of the added product (ISO 8601, YYYY-MM-DD). Defaults to coterminous with the subscription."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"Field name defined in the corresponding ExternalIdentifierConfiguration"},"value":{"type":"string","description":"External identifier value"},"externalUrl":{"type":"string","description":"Optional link to record in originating system"}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to attach, e.g. from NetSuite or Salesforce"}},"additionalProperties":false,"required":["productLineId"]},"description":"Replacement products to add. Same shape and pricing surface as top-level addLines. serviceStartDate defaults to the modificationDate and must resolve to the same date on every add in the group."}},"additionalProperties":false,"required":["cancelLines","addLines"]},"description":"Product replacements (swaps/downgrades). Each group is atomic: its added lines activate together on the group's service start date and each replaced line's service ends on that same date. A group must contain at least one cancelLine and one addLine (REPLACE_GROUP_INCOMPLETE), all its addLines must resolve to the same service start date (REPLACE_GROUP_START_DATE_MISMATCH), and in v1 that date must be the modificationDate. A line may be canceled only once across cancelLines and all groups (DUPLICATE_CANCEL_TARGET)."}},"additionalProperties":false,"required":["customerId","externalOrderId","modificationType"]},"createFundTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created fund transfer.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createFundTransferInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity to post the transfer under. See id on GET base/entities.","examples":["e8dc29b9-7e79-4709-bb32-95938bcb1bd1"]},"fromAccountId":{"type":"string","description":"The general-ledger account the money leaves. It must differ from toAccountId. See id on GET accounting/accounts/:id.","examples":["f50164c3-85e3-4dab-986e-3fdb39f8ecc1"]},"toAccountId":{"type":"string","description":"The general-ledger account the money arrives in. It must differ from fromAccountId. See id on GET accounting/accounts/:id.","examples":["9994c3ed-f812-44c1-9454-7f36b2bfb0fb"]},"transferDate":{"type":"string","format":"date","description":"The date the transfer takes place. Use format YYYY-MM-DD. It sets the posting period.","examples":["2026-02-14"]},"transferAmount":{"type":"string","format":"decimal","description":"The amount leaving the from-account, in the transfer currency. It must be greater than zero.","examples":["2500.00"]},"currency":{"type":"string","description":"The currency of the transfer amount. Format ISO 4217, for example 'USD'. Omit to use the from-account's own currency. A value that does not match it fails with CURRENCY_MISMATCH."},"toAmount":{"type":"string","format":"decimal","description":"The amount actually received in the to-account, in that account's currency. Supply it for a cross-currency transfer. Omit to mirror the amount sent."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate applied between the two account currencies. It must be greater than zero."},"status":{"type":"string","description":"The payment status. Accepted values: 'recorded', 'inProgress', 'completed', 'voided', 'failed', 'noStatus', 'unknown'. Defaults to 'recorded'."},"name":{"type":"string","description":"A short name for the transfer, shown in listings.","examples":["February sweep"]},"description":{"type":"string","description":"A free-form description of the transfer. It is copied onto both lines."},"toEntityId":{"type":"string","description":"The receiving legal entity, for a transfer between entities. Defaults to entityId. See id on GET base/entities."},"origin":{"type":"string","description":"The system or process the transfer came from."},"externalUrl":{"type":"string","description":"An absolute http or https link to the transfer in the originating system."},"externalPaymentId":{"type":"string","description":"The identifier of the payment in the source system this transfer settles."}},"additionalProperties":false,"required":["entityId","fromAccountId","toAccountId","transferDate","transferAmount"]},"createAccountingProductLinePricingOutput":{"type":"object","properties":{"createdPricingHeaderIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the created pricing headers, in the order you sent them."}},"additionalProperties":false,"required":["createdPricingHeaderIds"]},"createAccountingProductLinePricingInput":{"type":"object","properties":{"headers":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. Required when the product line is priced 'flat' or 'perUnit'."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Omit on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["unitOfMeasure"],"description":"The rate-card entry to attach. Provide only on rate-card-priced entries."}},"additionalProperties":false},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","priceBookEntries"]},"description":"The pricing headers to create for the product line."}},"additionalProperties":false,"required":["headers"]},"searchRevenueContractOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract."},"revenueContractNumber":{"type":"string","description":"The revenue contract number, unique within the tenant."},"approvalStatus":{"type":"string","description":"The approval status of the contract. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"generalStatus":{"type":"string","description":"The overall status of the contract, combining approval and any active revenue hold. Possible values: 'approved', 'approvedOnHold', 'pendingApproval', 'pendingApprovalOnHold'."},"revenueStatus":{"type":"string","description":"The revenue-recognition progress across the contract's lines. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isContractClosed":{"type":"boolean","description":"Whether the contract has been closed, with its open revenue moved to a new combined revenue contract."},"isContractCombined":{"type":"boolean","description":"Whether the contract is the combination target that absorbed a closed contract's open revenue."},"isLongTermContract":{"type":"boolean","description":"Whether the recognition window from revenueStartDate to revenueEndDate exceeds 366 days."},"sspCompliant":{"type":"boolean","description":"Whether every line not excluded from allocation is standalone-selling-price compliant. Absent when every line is excluded from allocation."},"currency":{"type":"string","description":"The currency the contract is denominated in. Every amount on the contract is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"type":"string","description":"The owning entity's functional currency. Present only when it differs from the contract currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the contract currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"entityId":{"type":"string","description":"The legal entity that owns this contract. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this contract."},"customerId":{"type":"string","description":"The customer this contract is with. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer this contract is with."},"salesOrderId":{"type":"string","description":"The sales order this contract was created from. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"type":"string","description":"The number of the sales order this contract was created from."},"modifiedRevenueContractId":{"type":"string","description":"The revenue contract this one was combined or modified into. Absent when there is no such successor. See id on GET accounting/revenue-contracts/:id."},"closeContractDate":{"type":"string","format":"date-time","description":"The date and time the contract was closed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on an open contract."},"migrationDate":{"type":"string","format":"date","description":"The date this contract's opening balances were migrated from a prior system. Format YYYY-MM-DD. Absent on a contract created natively."},"revenueStartDate":{"type":"string","format":"date","description":"The earliest revenue-recognition start date across the contract's lines. Format YYYY-MM-DD."},"revenueEndDate":{"type":"string","format":"date","description":"The latest revenue-recognition end date across the contract's lines. Format YYYY-MM-DD."},"salesEffectiveDate":{"type":"string","format":"date","description":"The book date of the sales order this contract was created from. Format YYYY-MM-DD."},"totalContractValue":{"type":"string","format":"decimal","description":"The total contract value, in the contract currency. It is the total price of the sales order this contract was created from, less the contract's cost-of-contract-value."},"totalContractAmount":{"type":"string","format":"decimal","description":"The total contract amount across the contract's open lines, in the contract currency."},"totalCostOfContractValue":{"type":"string","format":"decimal","description":"The total cost-of-contract-value excluded from the revenue calculation, in the contract currency."},"totalCostOfRevenue":{"type":"string","format":"decimal","description":"The total cost of revenue recognized, in the contract currency."},"totalEstimatedTransactionPrice":{"type":"string","format":"decimal","description":"The total estimated transaction price used in allocation, in the contract currency."},"totalFairValueAmount":{"type":"string","format":"decimal","description":"The total fair value used in allocation, in the contract currency."},"totalVariableConsideration":{"type":"string","format":"decimal","description":"The total variable consideration across the contract's lines, in the contract currency."},"deferredRevenue":{"type":"string","format":"decimal","description":"The deferred revenue not yet recognized, in the contract currency. Zero once the contract is closed."},"revenueAmount":{"type":"string","format":"decimal","description":"The total revenue across the contract's lines, in the contract currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The cumulative revenue recognized to date, in the contract currency."},"revenueRemaining":{"type":"string","format":"decimal","description":"The revenue remaining to be recognized, in the contract currency."},"remainingPerformanceObligation":{"type":"string","format":"decimal","description":"The remaining performance obligation, in the contract currency. It is contract value plus returns and variable consideration, less committed recognized revenue. Zero once the contract is closed."},"unbilledReceivables":{"type":"string","format":"decimal","description":"The sum of unbilled journal entries for this contract, in the contract currency."},"returnedAmount":{"type":"string","format":"decimal","description":"The amount returned against the contract's revenue plan, in the contract currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"The one-time discount allocated across the contract's lines, in the contract currency."},"pctRevenueRecognized":{"type":"string","format":"decimal","description":"The fraction of total contract value recognized to date, from 0 to 1. 1 once the contract is closed. A ratio, not an amount, with no currency of its own."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteRevenueContractId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The contract's identifiers in other systems, one per configured field name. An empty array or absent when the contract has none."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract line."},"revenueContractLineNumber":{"type":"string","description":"The revenue contract line number, unique within the contract."},"type":{"type":"string","description":"The kind of line. Possible values: 'standard', 'thresholdIncrement', 'overage'."},"currency":{"type":"string","description":"The currency the line is denominated in. Every amount on the line and its revenue plan is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"type":"string","description":"The owning entity's functional currency. Present only when it differs from the line currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the line currency to the functional currency. A ratio, not an amount, with no currency of its own."},"generalStatus":{"type":"string","description":"The overall status of the line, combining approval and any active revenue hold. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"revenueStatus":{"type":"string","description":"The revenue-recognition progress for the line. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isClosed":{"type":"boolean","description":"Whether the line has been closed, with its open revenue moved to a combined contract."},"isLongTerm":{"type":"boolean","description":"Whether the line's recognition window exceeds 366 days."},"isEvergreen":{"type":"boolean","description":"Whether the line has no fixed end date and recognizes indefinitely."},"sspCompliant":{"type":"boolean","description":"Whether the line is standalone-selling-price compliant."},"isAllocationExcluded":{"type":"boolean","description":"Whether the line is excluded from the contract's revenue allocation."},"productCode":{"type":"string","description":"The code of the product the line covers, as it stood when the line was created."},"unitOfMeasure":{"type":"string","description":"The unit the line's quantity is measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"performanceObligationName":{"type":"string","description":"The name of the performance obligation the line satisfies."},"operationalPerformanceObligationNumber":{"type":"string","description":"The number of the operational performance obligation the line is tracked under."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template that generated the line's plan."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized over the line's term. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"amortizationMethod":{"type":"string","description":"How the line's amount is spread across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"revenueSchedulingEvent":{"type":"string","description":"The event that starts recognition on the line. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"revenueAccount":{"type":"string","description":"The name of the revenue account the line recognizes into."},"deferredRevenueAccount":{"type":"string","description":"The name of the deferred-revenue account the line defers into."},"revRecStartDate":{"type":"string","format":"date","description":"The first day of the line's revenue-recognition window. Format YYYY-MM-DD."},"revRecEndDate":{"type":"string","format":"date","description":"The last day of the line's revenue-recognition window, inclusive. Format YYYY-MM-DD."},"salesOrderBookingDate":{"type":"string","format":"date","description":"The book date of the sales order line this line was created from. Format YYYY-MM-DD."},"revenueTerm":{"type":"string","format":"decimal","description":"The length of the line's revenue term, in the line's scheduling unit. A count, not an amount."},"salesOrderProductLine":{"type":"string","description":"The number of the sales order product line this line was created from."},"contractAmount":{"type":"string","format":"decimal","description":"The contract amount booked on the line, in the line currency."},"adjustedContractAmount":{"type":"string","format":"decimal","description":"The contract amount after modifications, in the line currency."},"listPrice":{"type":"string","format":"decimal","description":"The undiscounted list price of the line, in the line currency."},"totalContractValue":{"type":"string","format":"decimal","description":"The total contract value attributed to the line, in the line currency."},"totalCostOfContractValue":{"type":"string","format":"decimal","description":"The cost-of-contract-value excluded from the line's revenue calculation, in the line currency."},"costOfRevenueAmount":{"type":"string","format":"decimal","description":"The cost of revenue booked on the line, in the line currency."},"costOfRevenueRecognized":{"type":"string","format":"decimal","description":"The cost of revenue recognized to date on the line, in the line currency."},"estimatedTransactionPrice":{"type":"string","format":"decimal","description":"The estimated transaction price used for the line in allocation, in the line currency."},"fairValueAmount":{"type":"string","format":"decimal","description":"The fair value used for the line in allocation, in the line currency."},"variableConsideration":{"type":"string","format":"decimal","description":"The variable consideration on the line, in the line currency."},"extendedSSP":{"type":"string","format":"decimal","description":"The extended standalone selling price of the line, unit standalone selling price times quantity, in the line currency."},"revenueAmount":{"type":"string","format":"decimal","description":"The revenue allocated to the line, in the line currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The revenue recognized to date on the line, in the line currency."},"revenueRemaining":{"type":"string","format":"decimal","description":"The revenue still to be recognized on the line, in the line currency."},"deferredRevenueAmount":{"type":"string","format":"decimal","description":"The deferred revenue outstanding on the line, in the line currency."},"remainingPerformanceObligation":{"type":"string","format":"decimal","description":"The remaining performance obligation on the line, in the line currency."},"unbilledReceivables":{"type":"string","format":"decimal","description":"The unbilled receivables on the line, in the line currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The revenue on the line not yet scheduled into a plan period, in the line currency."},"totalInvoicedAmount":{"type":"string","format":"decimal","description":"The total invoiced against the line to date, in the line currency."},"oneTimeDiscountAllocationAmount":{"type":"string","format":"decimal","description":"The one-time discount allocated to the line, in the line currency."},"fvAllocationRatio":{"type":"string","format":"decimal","description":"The share of the contract's fair value allocated to the line, from 0 to 1. A ratio, not an amount, with no currency of its own."},"revenuePlanHeader":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue plan header."},"revenuePlanHeaderNumber":{"type":"string","description":"The revenue plan header number."},"status":{"type":"string","description":"The status of the plan. Possible values: 'notStarted', 'pendingRecognition', 'inProgress', 'complete', 'completeModified'."},"currency":{"type":"string","description":"The currency the plan is denominated in. Every amount on the plan and its plan lines is in this currency. Format ISO 4217, for example 'USD'."},"amortizationMethod":{"type":"string","description":"How the plan spreads its amount across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"revenueSchedulingEvent":{"type":"string","description":"The event that starts recognition on the plan. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"isContractClosed":{"type":"boolean","description":"Whether the contract behind the plan has been closed."},"revRecStartDate":{"type":"string","format":"date","description":"The first day of the plan's recognition window. Format YYYY-MM-DD."},"revRecEndDate":{"type":"string","format":"date","description":"The last day of the plan's recognition window, inclusive. Format YYYY-MM-DD."},"comments":{"type":"string","description":"Free-form comments recorded on the plan."},"amount":{"type":"string","format":"decimal","description":"The total amount the plan schedules, in the plan currency."},"totalRecognized":{"type":"string","format":"decimal","description":"The total recognized across the plan's lines to date, in the plan currency."},"remainingDeferred":{"type":"string","format":"decimal","description":"The amount still deferred on the plan, in the plan currency."},"returnedAmount":{"type":"string","format":"decimal","description":"The amount returned against the plan, in the plan currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The plan amount not yet scheduled into a period, in the plan currency."},"revenuePlanLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue plan line."},"lineId":{"type":"string","description":"The line identifier within the plan."},"revenuePlanType":{"type":"string","description":"What the plan line schedules. Possible values: 'revenueRecognition', 'returnRevenueRecognition', 'unCommittedRevenueRecognition', 'modificationDeferredRevenueAdjustment', 'allowance', 'overage', 'usageExpiration', 'costOfRevenue', 'unholdRevenuePeriod', 'retrospectiveAdjustment'."},"currency":{"type":"string","description":"The currency the plan line is denominated in. Format ISO 4217, for example 'USD'."},"plannedPeriod":{"type":"string","description":"The name of the accounting period this row is planned for."},"plannedPeriodDate":{"type":"string","format":"date","description":"The start date of the planned accounting period. Format YYYY-MM-DD. Plan lines are returned in ascending order of this date."},"postingPeriod":{"type":"string","description":"The name of the accounting period the row was posted in, when it differs from the planned one."},"isPosted":{"type":"boolean","description":"Whether the row has been posted to the general ledger."},"holdStatus":{"type":"string","description":"Whether revenue on the row is held back. Possible values: 'notHold', 'holdPlaced', 'holdRemoved'."},"releaseUnit":{"type":"string","description":"The unit the release amount is expressed in. Possible values: 'quantity', 'percent', 'amount'."},"releaseAmount":{"type":"string","format":"decimal","description":"The amount or quantity released in this period, in the unit given by releaseUnit."},"pctRecognizedInPeriod":{"type":"string","format":"decimal","description":"The fraction of the plan recognized in this period, from 0 to 1. A ratio, not an amount, with no currency of its own."},"cumulativePercentage":{"type":"string","format":"decimal","description":"The fraction of the plan recognized cumulatively through this period, from 0 to 1. A ratio, not an amount, with no currency of its own."},"revenueAccount":{"type":"string","description":"The name of the revenue account this row recognizes into."},"deferredRevenueAccount":{"type":"string","description":"The name of the deferred-revenue account this row releases from."},"journalEntry":{"type":"string","description":"The number of the journal entry this row posted through, once posted."},"amount":{"type":"string","format":"decimal","description":"The amount scheduled for this period, in the plan line currency."},"revenueAmount":{"type":"string","format":"decimal","description":"The revenue scheduled for this period, in the plan line currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The revenue recognized in this period, in the plan line currency."},"cumulativeRecognition":{"type":"string","format":"decimal","description":"The revenue recognized cumulatively through this period, in the plan line currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The amount on this row not yet scheduled, in the plan line currency."},"postedAmount":{"type":"string","format":"decimal","description":"The amount actually posted to the ledger for this row, in the plan line currency."}},"additionalProperties":false,"required":["id","revenuePlanType","currency"]},"description":"The plan's period rows, the recognition schedule, one entry per planned period, earliest planned period first. An empty array when the plan has not been scheduled yet."}},"additionalProperties":false,"required":["id","currency","revenueSchedulingEvent","isContractClosed"],"description":"The line's revenue plan, the schedule revenue is recognized against. At most one per line. Absent when no plan has been generated for the line yet."}},"additionalProperties":false,"required":["id","type","currency","isClosed","revenueSchedulingEvent"]},"description":"The contract's revenue lines, in line order, each with its revenue plan nested. An empty array when the contract has no lines."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue contract last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","approvalStatus","isContractClosed","isContractCombined","currency","exchangeRate","lastModifiedDate"]},"description":"The revenue contracts on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more revenue contracts remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchRevenueContractInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the revenue contract with this id."},"revenueContractNumber":{"type":"string","description":"Limits results to the revenue contract with this number. The match is exact."},"approvalStatus":{"type":"string","description":"Limits results to contracts in this approval status. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Any other value matches no contract."},"generalStatus":{"type":"string","description":"Limits results to contracts in this general status. Possible values: 'approved', 'approvedOnHold', 'pendingApproval', 'pendingApprovalOnHold'. Any other value matches no contract."},"revenueStatus":{"type":"string","description":"Limits results to contracts in this revenue-recognition status. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'. Any other value matches no contract."},"currency":{"type":"string","description":"Limits results to contracts in this currency. Format ISO 4217, for example 'USD'."},"isContractClosed":{"type":"boolean","description":"Limits results to closed contracts when true, or open contracts when false."},"isContractCombined":{"type":"boolean","description":"Limits results to combination-target contracts when true, or ordinary contracts when false."},"customerId":{"type":"string","description":"Limits results to contracts with this customer. See id on GET accounting/customers/:id. An id that matches no customer returns no contracts."},"entityId":{"type":"string","description":"Limits results to contracts owned by this legal entity. See id on GET base/entities. An id that matches no entity returns no contracts."},"salesOrderId":{"type":"string","description":"Limits results to contracts created from this sales order. See id on GET accounting/sales-orders/:id. An id that matches no sales order returns no contracts."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteRevenueContractId'."},"value":{"type":"string","description":"The identifier value to match, exactly as the other system stores it."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to the contract with this external identifier. Give both fieldName and value. A fieldName alone would match every system's value for that key."},"revenueStartDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest revenueStartDate to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest revenueStartDate to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to contracts whose revenueStartDate falls in this range. Omit either bound to leave that side open. Both bounds are inclusive."},"revenueEndDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest revenueEndDate to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest revenueEndDate to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to contracts whose revenueEndDate falls in this range. Omit either bound to leave that side open. Both bounds are inclusive."}},"additionalProperties":false,"description":"The filters to apply. A revenue contract must match every filter you send. Omit to return all revenue contracts."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of revenue contracts per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"searchPaymentOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment."},"paymentNumber":{"type":"string","description":"The payment number, unique within the tenant. A human-readable reference used for reconciliation."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"The payment method. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'."},"paymentAccountCurrency":{"type":"string","description":"The currency of the bank account the payment was received into. Present only when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The amount paid, in the payment currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The portion already applied to invoices, in the payment currency. The sum of the payment's applications."},"unappliedAmount":{"type":"string","format":"decimal","description":"The portion not yet applied to any invoice, in the payment currency. unappliedAmount = amount - appliedAmount - refundAmount."},"refundAmount":{"type":"string","format":"decimal","description":"The portion refunded through approved refunds, in the payment currency."},"bankFeeAmount":{"type":"string","format":"decimal","description":"The bank fee deducted from the payment, in the payment currency."},"smallBalanceWriteOffAmount":{"type":"string","format":"decimal","description":"The total written off as a small residual balance across the payment's applications, in the payment currency."},"totalEarlyPaymentDiscount":{"type":"string","format":"decimal","description":"The total early-payment discount granted across the payment's applications, in the payment currency."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the payment currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"customerPaymentStatus":{"type":"string","description":"The derived lifecycle status of the payment. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull', 'partiallyRefunded', 'refunded', 'disputed', 'chargedBack'."},"disputeStatus":{"type":"string","description":"The dispute state of the payment. Possible values: 'disputed', 'chargedBack'. Absent on an undisputed payment."},"paymentReference":{"type":"string","description":"The reference the payer supplied with the payment, for example a remittance or wire reference. Absent when none was supplied."},"paymentNote":{"type":"string","description":"A free-form note recorded on the payment. Absent when none was set."},"customerId":{"type":"string","description":"The customer the payment came from. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer the payment came from."},"thirdPartyPayerId":{"type":"string","description":"The customer who actually paid, when a third party paid on the invoiced customer's behalf. Absent when the invoiced customer paid. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity that received the payment. See id on GET base/entities."},"accountId":{"type":"string","description":"The ledger account the payment was posted to. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the ledger account the payment was posted to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","paymentDate","paymentType","currency","lastModifiedDate"]},"description":"The payments that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPaymentInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the payment with this identifier."},"paymentNumber":{"type":"string","description":"Limits results to the payment with this payment number."},"paymentType":{"type":"string","description":"Limits results to payments tendered this way. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'. Any other value matches no payment."},"customerPaymentStatus":{"type":"string","description":"Limits results to payments in this lifecycle status. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull', 'partiallyRefunded', 'refunded', 'disputed', 'chargedBack'. Any other value matches no payment."},"disputeStatus":{"type":"string","description":"Limits results to payments in this dispute state. Possible values: 'disputed', 'chargedBack'. Any other value matches no payment."},"paymentReference":{"type":"string","description":"Limits results to payments with this payer-supplied reference."},"customerId":{"type":"string","description":"Limits results to payments from this customer. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"Limits results to payments received by this legal entity. See id on GET base/entities."},"paymentDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest paymentDate to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest paymentDate to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to payments whose paymentDate falls in this range. Both bounds are inclusive. Omit either bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A payment must match every filter you send. Omit to return all payments."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of payments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"customersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the customer."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number. Example: 'CUS-789012'."},"customerName":{"type":"string","description":"The name of the customer, as it appears on invoices."},"customerCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Customer code as maintained by whoever set the record up — a human-readable key that is not the system-assigned customerNumber, and absent where nobody assigned one. Do not treat it as unique unless the tenant maintains it that way. Returned only — it can be neither filtered nor sorted on."},"customerType":{"type":"string","description":"The customer type. Possible values: 'default' (a direct customer), 'partner' (a reseller or third-party payer that is invoiced for its end customers), 'endCustomer' (a customer that buys through a partner)."},"partnerType":{"anyOf":[{"oneOf":[{"const":"reseller","description":"Resells to its own end customers."},{"const":"thirdPartyPayer","description":"Pays on behalf of the end customer."}]},{"type":"null"}],"description":"Partner type, set only when customerType is 'partner'."},"businessType":{"type":"string","description":"The business type of the customer. Possible values: 'company', 'individual'."},"customerSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'. Absent when businessType is 'individual'."},"status":{"anyOf":[{"oneOf":[{"const":"active","description":"The record is in use."},{"const":"inactive","description":"The record has been deactivated."}]},{"type":"null"}],"description":"Whether the customer record is active. This is the record's own state and says nothing about trading: an active customer may have no order and no receivable, and an inactive one may still carry an open balance. A report counting customers by commercial activity reads sales orders or invoices instead, and says which."},"salesChannel":{"anyOf":[{"oneOf":[{"const":"salesAssisted","description":"Sold through the sales team."},{"const":"selfServe","description":"Bought by the customer without a salesperson."}]},{"type":"null"}],"description":"How the customer was sold to."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that owns this customer."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that invoices this customer."},"globalParentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The top-level customer of the hierarchy this customer belongs to — the customer itself when it is the top. Absent when the customer belongs to no hierarchy. The id rather than the name, so a hierarchy can be traversed rather than only grouped."},"globalParentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the global parent customer. Returned only — it can be neither filtered nor sorted on."},"defaultCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code."},"taxExempt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the customer is exempt from tax."},"paymentTermLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the payment term applied to the customer's invoices. See label on GET accounting/payment-terms."},"exemptionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax-exemption certificate number. Absent when taxExempt is false."},"invoiceEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address invoices are sent to."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 3166 country code of the customer's DEFAULT sold-to address — the country a report groups or maps by. A customer with several addresses is counted once, at the default sold-to; absent when no default sold-to address is on file, which is a gap in the record rather than a customer without a country. The full address is on GET accounting/customers/:id."},"stateProvince":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State or province of the same default sold-to address. The spelling is NOT uniform: most values are ISO 3166-2 subdivision codes (US-CA, GB-ENG) and some are plain names (Idaho, Virginia), because the address record accepts either. A filter written for one form misses the other, and grouping by this field splits one state into two — normalise first, or group by country instead. Absent where the address carries no state."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the customer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the accounting book."},"name":{"type":"string","description":"The display name of the accounting book."},"type":{"type":"string","description":"The kind of accounting book. Possible values: 'full', 'adjustment'. An adjustment book adjusts the full book named in baseBookId."},"accountingStandard":{"type":"string","description":"The accounting standard the book follows, for example 'IFRS' or 'US GAAP'. Absent when none is set."},"consolidation":{"type":"boolean","description":"Whether the book consolidates other books or entities."},"description":{"type":"string","description":"A free-form description of the accounting book. Absent when none is set."},"baseBookId":{"type":"string","description":"The full book this adjustment book adjusts. Absent for a full book. See id on GET accounting/books/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the accounting book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","type","consolidation","lastModifiedDate"]},"paymentTermsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment term."},"code":{"type":"string","description":"The code of the payment term. Unique within the tenant. Other records refer to a payment term by this code. See paymentTermCode on POST accounting/customers. Examples: 'net30', 'dueOnReceipt'."},"label":{"type":"string","description":"The display name of the payment term. See paymentTermLabel on GET accounting/customers/:id. Example: 'Net 30'."},"description":{"type":"string","description":"A description of the payment term."},"numberOfDays":{"type":"number","description":"The number of days after the invoice date on which payment is due."},"discountPercentage":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The discount for paying within discountValidityDays, as a decimal fraction of the invoice amount. For example, 0.02 is 2%. 0 when the term has no discount."},"discountValidityDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days after the invoice date during which discountPercentage applies. 0 when the term has no discount."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment term last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getBankAccountOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account."},"externalAccountId":{"type":"string","description":"The identifier this account has in the bank or aggregator it was connected from. Unique within the tenant."},"externalAccountName":{"type":"string","description":"The account name as reported by the bank or aggregator."},"externalDescription":{"type":"string","description":"The account description as reported by the bank or aggregator."},"type":{"type":"string","description":"The kind of account, as free-form text. For example 'checking', 'saving' or 'creditCard'."},"currency":{"type":"string","description":"The currency the account is held in. Format ISO 4217, for example 'USD'. balance is in this currency."},"balance":{"type":"string","format":"decimal","description":"The current account balance, in currency."},"mask":{"type":"string","description":"A masked form of the account number, for example '****1234'. Display it instead of reference where the full number is not needed."},"reference":{"type":"string","description":"The full account number, the IBAN or the ACH account number."},"referenceType":{"type":"string","description":"How referenceNumber is structured. Possible values: 'QRR', 'SCOR', 'NON'. 'QRR' is a Swiss QR reference, 'SCOR' an ISO 11649 creditor reference, and 'NON' none."},"referenceNumber":{"type":"string","description":"A structured payment reference for payments to this account, interpreted per referenceType."},"bankAccountCode":{"type":"string","description":"The bank identifier, the SWIFT/BIC code or the US routing number."},"bankAccountHolderName":{"type":"string","description":"The name the account is held in. This is personal data."},"paymentAllowed":{"type":"boolean","description":"Whether payments may be made from this account."},"receivableAccount":{"type":"boolean","description":"Whether this account may be used to receive money."},"payableAccount":{"type":"boolean","description":"Whether this account may be used to pay money out."},"isReady":{"type":"boolean","description":"Whether the account is fully set up and usable."},"reconciliationStartDate":{"type":"string","format":"date","description":"The date from which this account is reconciled. Format YYYY-MM-DD. Transactions before it are not reconciled."},"transactionsImportDate":{"type":"string","format":"date","description":"The date from which transactions are imported for this account. Format YYYY-MM-DD."},"accountId":{"type":"string","description":"The chart-of-accounts account this bank account is linked to. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the linked chart-of-accounts account."},"accountNumber":{"type":"string","description":"The number of the linked chart-of-accounts account. This is a general-ledger account number, not the bank account number, which is reference."},"bankName":{"type":"string","description":"The name of the bank this account is held at."},"financialInstitutionId":{"type":"string","description":"The financial institution this account is held at. There is no endpoint for it."},"entityId":{"type":"string","description":"The legal entity that owns this account. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this account."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank account last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","externalAccountId","paymentAllowed","reconciliationStartDate","lastModifiedDate"]},"getSalesOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order."},"orderNumber":{"type":"string","description":"The sales order number. Unique within the tenant. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"bookDate":{"type":"string","format":"date","description":"The date the sales order was booked. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the order's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the order's service period. Absent when isEvergreen is true. Format YYYY-MM-DD."},"signDate":{"type":"string","format":"date","description":"The date the sales order was signed. Format YYYY-MM-DD."},"salesEffectiveDate":{"type":"string","format":"date","description":"The date the contract legally takes effect. salesEffectiveDate can be earlier than signDate. Format YYYY-MM-DD."},"isEvergreen":{"type":"boolean","description":"Whether the order is evergreen, meaning at least one of its subscriptions has no end date and keeps billing until it is canceled."},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the invoices, credit memos, and debit memos created from this order are left out of the tax engine. Always false when your tenant does not allow sales orders to be excluded from the tax engine."},"term":{"type":"string","format":"decimal","description":"The length of the order's term, in months. Absent when isEvergreen is true."},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'."},"totalContract":{"type":"string","format":"decimal","description":"The total value of the order before tax, in the order currency: the sum of totalPrice across its lines minus oneTimeDiscountAmount."},"invoicedAmount":{"type":"string","format":"decimal","description":"The amount invoiced from this order so far, in the order currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"The one-time discount on the order as a whole, in the order currency."},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the order's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to the order's invoices. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"memo":{"type":"string","description":"A memo on the sales order."},"crmContractId":{"type":"string","description":"The identifier of the contract this order came from, in an external CRM system."},"salesArrangement":{"type":"string","description":"The number of the sales arrangement this order belongs to. No endpoint returns sales arrangements."},"salesArrangementId":{"type":"string","description":"The sales arrangement this order belongs to. No endpoint returns sales arrangements."},"paymentTermId":{"type":"string","description":"The payment term applied to the order's invoices. See id on GET accounting/payment-terms."},"opportunityId":{"type":"string","description":"The identifier of the opportunity this order came from, in an external CRM system."},"opportunityName":{"type":"string","description":"The name of the opportunity this order came from."},"dataSource":{"type":"string","description":"The system the order came from. Examples: 'Salesforce', 'NetSuite'."},"priceBookId":{"type":"string","description":"The price book the order's list prices come from. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The name of the price book the order's list prices come from. See priceBookName on GET accounting/price-books/:id."},"externalizedInvoicing":{"type":"boolean","description":"Whether another system invoices this order. When true, no invoice plans are created for the order."},"customer":{"type":"object","properties":{"id":{"type":"string","description":"The customer's identifier. See id on GET accounting/customers/:id."},"customerNumber":{"type":"string","description":"The customer number. Example: 'CUS-789012'."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to."},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"segment":{"type":"string","description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax."}},"additionalProperties":false,"required":["id","name"],"description":"The customer this order is for."},"entityId":{"type":"string","description":"The legal entity that owns this sales order. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this sales order. See entityName on GET base/entities."},"entityNumber":{"type":"string","description":"The number of the legal entity that owns this sales order. See entityNumber on GET base/entities."},"soldToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The sold-to address of the order. It is the customer address used to calculate tax."},"billToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The bill-to address of the order."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The subscription's identifier. See id on GET accounting/subscriptions/:id."},"subscriptionNumber":{"type":"string","format":"decimal","description":"The subscription number. See subscriptionNumber on GET accounting/subscriptions/:id."},"externalSubscriptionId":{"type":"string","description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"serviceStartDate":{"type":"string","format":"date","description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The latest service end date across all of the subscription's lines, including lines from other orders. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"products":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"The code of the product. See productCode on GET accounting/products/:id."},"productId":{"type":"string","description":"The product ordered on this line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line ordered on this line. See id on GET accounting/product-lines/:id."},"productName":{"type":"string","description":"The product's current name. See productName on GET accounting/products/:id."},"salesOrderProductLineId":{"type":"string","description":"The unique identifier for this order line. On a ramp deal, the identifier of the earliest ramp's line. The other ramps' line identifiers are not returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered on this line. On a ramp deal, it is the first ramp's quantity."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit, in the order currency. unitPrice = listPrice - discountAmount = listPrice × (1 - discountPercentage)."},"totalPrice":{"type":"string","format":"decimal","description":"The total price of the line, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit, as a decimal fraction of listPrice. For example, 0.1 is 10%."},"invoiceFrequency":{"type":"string","description":"How often the line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'. See invoiceFrequency on GET accounting/product-lines/:id."},"invoiceTiming":{"type":"string","description":"When the line is invoiced relative to the period it covers. Possible values: 'advance' (at the start of the period), 'arrears' (at the end of the period)."},"lineInvoiceDay":{"type":"string","description":"The day of the period the line is invoiced on. Possible values: 'anniversary', 'first', 'last', 'specific'."},"priceModel":{"type":"string","description":"How the price of this order line depends on quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. See priceModel on GET accounting/product-lines/:id."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. See unitOfMeasure on GET accounting/product-lines/:id."},"pricingTerm":{"type":"string","description":"The period the unit price covers. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'. See pricingTerm on GET accounting/product-lines/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of this line's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this line's service period. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array when the line has none."},"overage":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price per unit of overage usage, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit of overage usage, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, as a decimal fraction of listPrice. For example, 0.1 is 10%. Absent when discountAmount is present."}},"additionalProperties":false,"description":"The pricing for usage above the line's allowance. Absent when the line has no overage discount."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate card entry."},"identifier":{"type":"string","description":"The identifier of the billable component this entry prices. No endpoint returns billable components."},"label":{"type":"string","description":"A description of the rate card entry."},"unitOfMeasure":{"type":"string","description":"The unit this entry is priced in, for example 'user' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in this entry's currency."},"currency":{"type":"string","description":"The currency of unitPrice. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","unitOfMeasure","unitPrice","currency"]},"description":"The rate card entries of this line. Absent when the line has none."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier starts."},"toQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier ends. Absent on the last tier, which has no upper limit."},"unitPrice":{"type":"string","format":"decimal","description":"The price for this tier, in the order currency. When priceModel is 'perUnit', it is charged for each unit priced in this tier. When priceModel is 'flat', it is charged once for the tier, whatever the number of units."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this tier before discount, in the order currency."},"priceModel":{"type":"string","description":"How unitPrice applies within this tier. Possible values: 'flat', 'perUnit'."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of this line, lowest fromQuantity first. Absent when the line has none."},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The name of the tag dimension, for example 'Department'."},"value":{"type":"string","description":"The tag value within the dimension, for example 'Engineering'."}},"additionalProperties":false,"required":["dimension","value"]},"description":"The value accounting tags of this product, as dimension and value pairs. Every line of the same product has the same tags. Absent when the product has no tags."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the order's record of this item."},"itemId":{"type":"string","description":"The inventory item. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item code of the inventory item. See itemCode on GET inventory/items/:id."},"itemName":{"type":"string","description":"The name of the inventory item."},"productName":{"type":"string","description":"The name of the product the item belongs to."},"itemOrdered":{"type":"string","format":"decimal","description":"The quantity of this item ordered: the total quantity of the product across its lines on this order. It is not multiplied by the item's quantity in the product definition."},"totalShipped":{"type":"string","format":"decimal","description":"The quantity of this item shipped so far, summed across its shipments."}},"additionalProperties":false,"required":["id","itemOrdered"]},"description":"The inventory items of this product. Every line of the same product has the same items. Absent when the product has no items or is a ramp deal."},"rampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"How the ramp periods are set. Possible values: 'annually', 'specificDates'."},"invoiceTiming":{"type":"string","description":"How the ramp deal is invoiced. Possible values: 'perInterval', 'allAtOnce'."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"The first day of this ramp. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this ramp. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity for this ramp."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit for this ramp before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit for this ramp, in the order currency."},"invoiceFrequency":{"type":"string","description":"How often this ramp is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."}},"additionalProperties":false,"required":["serviceStartDate","serviceEndDate","quantity"]},"description":"The ramps of the deal, earliest first."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Present only when the product is a ramp deal. The entry then represents the whole product, and each ramp in ramps is one of its product lines, with its own dates, quantity, and prices, earliest first. On a ramp deal, the entry has no listPrice, unitPrice, totalPrice, discountAmount, discountPercentage, serviceStartDate, serviceEndDate, items, tiers, rateCardEntries, overage, or prepaidConfiguration."},"prepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative' (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews), 'overage' (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate)."},"rolloverAtRenewal":{"type":"boolean","description":"Whether unused balance rolls over when the subscription renews."},"balance":{"type":"string","format":"decimal","description":"The prepaid units (credits) left in the balance."},"consumedAmount":{"type":"string","format":"decimal","description":"The prepaid units (credits) used so far: the quantity funded by this line minus the current balance. Absent when balance is absent."}},"additionalProperties":false,"required":["overConsumptionBehavior","rolloverAtRenewal"],"description":"The prepaid balance settings of this line. Absent when the line is not a prepaid line."}},"additionalProperties":false,"required":["productCode","productId","productLineId","quantity","externalIdentifiers"]},"description":"The product lines of this subscription on this order, one entry per product line. For a ramp deal, one entry represents the whole product, and each ramp in rampDeal.ramps is one of its product lines."}},"additionalProperties":false,"required":["products"]},"description":"The order's subscriptions, each with the product lines that belong to it. An empty array when the order has none."},"nonSubscriptionProducts":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"The code of the product. See productCode on GET accounting/products/:id."},"productId":{"type":"string","description":"The product ordered on this line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line ordered on this line. See id on GET accounting/product-lines/:id."},"productName":{"type":"string","description":"The product's current name. See productName on GET accounting/products/:id."},"salesOrderProductLineId":{"type":"string","description":"The unique identifier for this order line. On a ramp deal, the identifier of the earliest ramp's line. The other ramps' line identifiers are not returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered on this line. On a ramp deal, it is the first ramp's quantity."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit, in the order currency. unitPrice = listPrice - discountAmount = listPrice × (1 - discountPercentage)."},"totalPrice":{"type":"string","format":"decimal","description":"The total price of the line, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit, as a decimal fraction of listPrice. For example, 0.1 is 10%."},"invoiceFrequency":{"type":"string","description":"How often the line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'. See invoiceFrequency on GET accounting/product-lines/:id."},"invoiceTiming":{"type":"string","description":"When the line is invoiced relative to the period it covers. Possible values: 'advance' (at the start of the period), 'arrears' (at the end of the period)."},"lineInvoiceDay":{"type":"string","description":"The day of the period the line is invoiced on. Possible values: 'anniversary', 'first', 'last', 'specific'."},"priceModel":{"type":"string","description":"How the price of this order line depends on quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. See priceModel on GET accounting/product-lines/:id."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. See unitOfMeasure on GET accounting/product-lines/:id."},"pricingTerm":{"type":"string","description":"The period the unit price covers. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'. See pricingTerm on GET accounting/product-lines/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of this line's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this line's service period. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array when the line has none."},"overage":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price per unit of overage usage, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit of overage usage, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, as a decimal fraction of listPrice. For example, 0.1 is 10%. Absent when discountAmount is present."}},"additionalProperties":false,"description":"The pricing for usage above the line's allowance. Absent when the line has no overage discount."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate card entry."},"identifier":{"type":"string","description":"The identifier of the billable component this entry prices. No endpoint returns billable components."},"label":{"type":"string","description":"A description of the rate card entry."},"unitOfMeasure":{"type":"string","description":"The unit this entry is priced in, for example 'user' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in this entry's currency."},"currency":{"type":"string","description":"The currency of unitPrice. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","unitOfMeasure","unitPrice","currency"]},"description":"The rate card entries of this line. Absent when the line has none."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier starts."},"toQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier ends. Absent on the last tier, which has no upper limit."},"unitPrice":{"type":"string","format":"decimal","description":"The price for this tier, in the order currency. When priceModel is 'perUnit', it is charged for each unit priced in this tier. When priceModel is 'flat', it is charged once for the tier, whatever the number of units."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this tier before discount, in the order currency."},"priceModel":{"type":"string","description":"How unitPrice applies within this tier. Possible values: 'flat', 'perUnit'."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of this line, lowest fromQuantity first. Absent when the line has none."},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The name of the tag dimension, for example 'Department'."},"value":{"type":"string","description":"The tag value within the dimension, for example 'Engineering'."}},"additionalProperties":false,"required":["dimension","value"]},"description":"The value accounting tags of this product, as dimension and value pairs. Every line of the same product has the same tags. Absent when the product has no tags."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the order's record of this item."},"itemId":{"type":"string","description":"The inventory item. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item code of the inventory item. See itemCode on GET inventory/items/:id."},"itemName":{"type":"string","description":"The name of the inventory item."},"productName":{"type":"string","description":"The name of the product the item belongs to."},"itemOrdered":{"type":"string","format":"decimal","description":"The quantity of this item ordered: the total quantity of the product across its lines on this order. It is not multiplied by the item's quantity in the product definition."},"totalShipped":{"type":"string","format":"decimal","description":"The quantity of this item shipped so far, summed across its shipments."}},"additionalProperties":false,"required":["id","itemOrdered"]},"description":"The inventory items of this product. Every line of the same product has the same items. Absent when the product has no items or is a ramp deal."},"rampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"How the ramp periods are set. Possible values: 'annually', 'specificDates'."},"invoiceTiming":{"type":"string","description":"How the ramp deal is invoiced. Possible values: 'perInterval', 'allAtOnce'."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"The first day of this ramp. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this ramp. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity for this ramp."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit for this ramp before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit for this ramp, in the order currency."},"invoiceFrequency":{"type":"string","description":"How often this ramp is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."}},"additionalProperties":false,"required":["serviceStartDate","serviceEndDate","quantity"]},"description":"The ramps of the deal, earliest first."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Present only when the product is a ramp deal. The entry then represents the whole product, and each ramp in ramps is one of its product lines, with its own dates, quantity, and prices, earliest first. On a ramp deal, the entry has no listPrice, unitPrice, totalPrice, discountAmount, discountPercentage, serviceStartDate, serviceEndDate, items, tiers, rateCardEntries, overage, or prepaidConfiguration."},"prepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative' (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews), 'overage' (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate)."},"rolloverAtRenewal":{"type":"boolean","description":"Whether unused balance rolls over when the subscription renews."},"balance":{"type":"string","format":"decimal","description":"The prepaid units (credits) left in the balance."},"consumedAmount":{"type":"string","format":"decimal","description":"The prepaid units (credits) used so far: the quantity funded by this line minus the current balance. Absent when balance is absent."}},"additionalProperties":false,"required":["overConsumptionBehavior","rolloverAtRenewal"],"description":"The prepaid balance settings of this line. Absent when the line is not a prepaid line."}},"additionalProperties":false,"required":["productCode","productId","productLineId","quantity","externalIdentifiers"]},"description":"The order's product lines that belong to no subscription, with the same fields as subscriptions[].products. An empty array when the order has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to product lines do not update it."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The order's identifiers in other systems, at most one per field name. An empty array when the order has none."}},"additionalProperties":false,"required":["id","orderNumber","bookDate","currency","customer","entityId","entityNumber","soldToAddress","billToAddress","subscriptions","nonSubscriptionProducts","lastModifiedDate"]},"updateInvoiceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the updated invoice. Read the invoice back with GET accounting/invoices/:id to see the recalculated totals.","examples":["f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"]}},"additionalProperties":false,"required":["id"]},"updateInvoiceInput":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date","description":"The date the invoice was issued. Format YYYY-MM-DD. Omit to leave unchanged. Changing it re-derives the due date from the payment term and moves which tax period the invoice falls in.","examples":["2026-09-05"]},"paymentTerm":{"type":"string","description":"The payment term governing when payment falls due, as the term's configured code. Omit to leave unchanged. An empty string is ignored rather than clearing it. This field is write-only: the read endpoints publish the resolved paymentTermDays instead of the term itself."},"customerMessage":{"type":"string","description":"A free-form message printed on the invoice for the customer. Omit to leave unchanged. It cannot be cleared through this endpoint. An empty string is ignored, not stored.","examples":["Thank you for your business."]},"purchaseOrderOverride":{"type":"string","description":"A manually entered PO number that overrides the references derived from the sales order. Omit to leave unchanged. Unlike the other fields here, pass an empty string to clear it and fall back to the sales order's own PO references."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice line to edit, as returned by GET accounting/invoices/:id. It must be a line of this invoice, and may appear at most once in the request."},"description":{"type":"string","description":"The new line description, as shown to the customer. Omit to leave unchanged."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs charged on this line, in the invoice's currency. Requires the entity's Duties and Customs feature to be enabled, and setting it recalculates the invoice's journal entry. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"The line edits to apply, each addressing one existing line of this invoice by its id. Omit to leave the lines untouched. Lines cannot be added or removed here, because the set of lines comes from the sales order's invoice plan.","examples":[[{"id":"5e2a7c81-9d34-4b06-8f19-2c7e4a0d3b58","description":"Platform subscription — September 2026","dutiesAndCustomsAmount":"45.00"}]]}},"additionalProperties":false},"getJournalEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the journal entry."},"approvalStatus":{"type":"string","description":"The approval status of the journal entry. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Absent on entries that never entered the approval workflow."},"bookId":{"type":"string","description":"The accounting book this entry posts to. See id on GET accounting/books/:id."},"description":{"type":"string","description":"A free-form description of the journal entry."},"name":{"type":"string","description":"The display name of the journal entry."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Format YYYY-MM-DD."},"reversalDate":{"type":"string","format":"date","description":"The reversal date recorded on the entry. Format YYYY-MM-DD. Set only on a reversed entry or a reversal entry."},"reversalDescription":{"type":"string","description":"The description recorded on the reversal."},"reversalReason":{"type":"string","description":"The reason recorded for the reversal. Possible values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'."},"status":{"type":"string","description":"The posting status of the journal entry. Possible values: 'posted', 'unposted', 'voided'."},"type":{"type":"string","description":"How the entry originated, for example 'manual', 'invoice', 'revaluation' or 'reversal'. A system-assigned value."},"url":{"type":"string","description":"A link to the source document this entry comes from."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the journal entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line has either a debit or a credit, not both."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line has either a debit or a credit, not both."},"description":{"type":"string","description":"A free-form description of the line."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"intercompanyPartnerId":{"type":"string","description":"The intercompany counterparty for this line. Set on intercompany lines."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate used to convert the line's transactional amount to its functional amount."},"functionalCredit":{"type":"string","format":"decimal","description":"The credit amount for this line, in the functional currency."},"functionalCurrency":{"type":"string","description":"The functional currency of the posting entity. Format ISO 4217, for example 'USD'."},"functionalDebit":{"type":"string","format":"decimal","description":"The debit amount for this line, in the functional currency."},"journalEntryId":{"type":"string","description":"The journal entry this line belongs to. See id on GET accounting/journal-entries/:id."},"lineNumber":{"type":"number","description":"The line's sequential number within the entry."},"lineType":{"type":"string","description":"The classification of the line, for example 'standard', 'tax', 'offset' or 'fxRoundingDifference'. A system-assigned value. Absent when the line has no classification."},"postingPeriodId":{"type":"string","description":"The accounting period this line posts to. See id on GET accounting/accounting-periods/:id."},"revaluation":{"type":"boolean","description":"Whether a currency-revaluation process created this line."},"sourceTransaction":{"type":"string","description":"The identifier of the source transaction that generated this line, for example an invoice or payment number."},"transactionalCurrency":{"type":"string","description":"The currency of the line's transactional amounts. Format ISO 4217, for example 'USD'."},"transactionDate":{"type":"string","format":"date","description":"The date of the underlying transaction. Format YYYY-MM-DD. It can differ from the posting date."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this tag points to, on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to. Present only for a custom-dimension tag. See id on GET base/custom-dimensions."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. A historical entry can have tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags assigned to this line. Set them with create or update."}},"additionalProperties":false,"required":["id","accountId","entityId"]},"description":"The debit and credit lines of the entry."}},"additionalProperties":false,"required":["id","postingDate","status","lastModifiedDate","lines"]},"getInvoiceRunOutput":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice run."},"invoiceRunNumber":{"type":"string","description":"The invoice run number, for example 'ISR-1042'. Absent while none has been assigned."},"status":{"type":"string","description":"The execution status of the run. Possible values: 'created', 'running', 'completed', 'error', 'completeAndError'. Keep polling on 'created' and 'running'. 'completeAndError' means some invoices were created and some lines failed."},"invoicesCreated":{"type":"number","description":"The number of invoices the run has created."},"startedAt":{"type":"string","description":"The date and time the run was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"finishedAt":{"type":"string","description":"The date and time the run finished, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent while the run is still working, and on a run whose worker stopped without recording one."},"lastModifiedDate":{"type":"string","description":"The date and time the invoice run record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"trigger":{"type":"string","description":"What started the run. Possible values: 'immediately', 'daily', 'monthly'. 'immediately' is an ad-hoc run. 'daily' and 'monthly' are scheduled."},"scope":{"type":"array","items":{"enum":["all","oneTimeAndRecurring","usageInArrears","billableProducts"]},"description":"The line types the run billed."},"entityId":{"type":"string","description":"The legal entity billed. See id on GET base/entities."},"salesOrderId":{"type":"string","description":"The sales order billed. Present on a sales-order-scoped run. See id on GET accounting/sales-orders/:id."},"customerId":{"type":"string","description":"The customer billed. Absent on a run that created no invoice and recorded no error. See id on GET accounting/customers/:id."},"progress":{"type":"object","properties":{"title":{"type":"string","description":"The phase the run is in, for example preparing data or creating invoices."},"message":{"type":"string","description":"Further detail on the current phase, when the run supplies any."},"progress":{"type":"number","description":"The number of items processed so far in the current phase."},"total":{"type":"number","description":"The number of items to process in the current phase."}},"additionalProperties":false,"description":"The run's own progress reporting while it works. It is advisory: absent before the run starts reporting, and never a substitute for 'status'."},"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice. See id on GET accounting/invoices/:id."},"invoiceNumber":{"type":"string","description":"The invoice number, for example 'INV-20841'."},"totalAmount":{"type":"string","format":"decimal","description":"The total amount of the invoice including tax, in the currency named by 'currency'."},"currency":{"type":"string","description":"The currency of the invoice. Format ISO 4217, for example 'EUR'."}},"additionalProperties":false,"required":["id"]},"description":"The invoices the run created. Each has its own currency, so there is no summed run total."},"errors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Why the line could not be billed. Possible values: 'system', 'avalaraAddress', 'taxCode', 'none', 'taxCalculation', 'vatEntity', 'accountConfig', 'vatCustomer', 'invoiceSetupIncomplete', 'invoiceDelivery'."},"detail":{"type":"string","description":"A description of why the line failed."},"customerId":{"type":"string","description":"The customer the failing line belongs to. See id on GET accounting/customers/:id."}},"additionalProperties":false,"required":["type"]},"description":"The lines the run could not bill, one entry each. A non-empty array with a non-zero 'invoicesCreated' is the 'completeAndError' outcome."}},"additionalProperties":false,"required":["id","status","invoicesCreated","scope","invoices","errors"],"description":"The requested invoice run.","examples":[{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completeAndError","invoicesCreated":2,"startedAt":"2026-09-30T08:14:22.000Z","finishedAt":"2026-09-30T08:15:07.000Z","trigger":"immediately","scope":["all"],"entityId":"6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53","salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","customerId":"d41d8cd9-8f00-4b20-a204-9800998ecf84","invoices":[{"id":"a2c5e881-4f37-4b09-9d16-8e3b0c7a5d24","invoiceNumber":"INV-20841","totalAmount":"1210.00","currency":"EUR"}],"errors":[{"type":"taxCode","detail":"No tax code resolves for product line SO-114-3 in DE.","customerId":"d41d8cd9-8f00-4b20-a204-9800998ecf84"}]}]}},"additionalProperties":false,"required":["data"]},"searchJournalEntriesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the journal entry."},"approvalStatus":{"type":"string","description":"The approval status of the journal entry. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Absent on entries that never entered the approval workflow."},"bookId":{"type":"string","description":"The accounting book this entry posts to. See id on GET accounting/books/:id."},"description":{"type":"string","description":"A free-form description of the journal entry."},"name":{"type":"string","description":"The display name of the journal entry."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Format YYYY-MM-DD."},"reversalDate":{"type":"string","format":"date","description":"The reversal date recorded on the entry. Format YYYY-MM-DD. Set only on a reversed entry or a reversal entry."},"reversalDescription":{"type":"string","description":"The description recorded on the reversal."},"reversalReason":{"type":"string","description":"The reason recorded for the reversal. Possible values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'."},"status":{"type":"string","description":"The posting status of the journal entry. Possible values: 'posted', 'unposted', 'voided'."},"type":{"type":"string","description":"How the entry originated, for example 'manual', 'invoice', 'revaluation' or 'reversal'. A system-assigned value."},"url":{"type":"string","description":"A link to the source document this entry comes from."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the journal entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line has either a debit or a credit, not both."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line has either a debit or a credit, not both."},"description":{"type":"string","description":"A free-form description of the line."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"intercompanyPartnerId":{"type":"string","description":"The intercompany counterparty for this line. Set on intercompany lines."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate used to convert the line's transactional amount to its functional amount."},"functionalCredit":{"type":"string","format":"decimal","description":"The credit amount for this line, in the functional currency."},"functionalCurrency":{"type":"string","description":"The functional currency of the posting entity. Format ISO 4217, for example 'USD'."},"functionalDebit":{"type":"string","format":"decimal","description":"The debit amount for this line, in the functional currency."},"journalEntryId":{"type":"string","description":"The journal entry this line belongs to. See id on GET accounting/journal-entries/:id."},"lineNumber":{"type":"number","description":"The line's sequential number within the entry."},"lineType":{"type":"string","description":"The classification of the line, for example 'standard', 'tax', 'offset' or 'fxRoundingDifference'. A system-assigned value. Absent when the line has no classification."},"postingPeriodId":{"type":"string","description":"The accounting period this line posts to. See id on GET accounting/accounting-periods/:id."},"revaluation":{"type":"boolean","description":"Whether a currency-revaluation process created this line."},"sourceTransaction":{"type":"string","description":"The identifier of the source transaction that generated this line, for example an invoice or payment number."},"transactionalCurrency":{"type":"string","description":"The currency of the line's transactional amounts. Format ISO 4217, for example 'USD'."},"transactionDate":{"type":"string","format":"date","description":"The date of the underlying transaction. Format YYYY-MM-DD. It can differ from the posting date."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this tag points to, on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to. Present only for a custom-dimension tag. See id on GET base/custom-dimensions."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. A historical entry can have tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags assigned to this line. Set them with create or update."}},"additionalProperties":false,"required":["id","accountId","entityId"]},"description":"The debit and credit lines of the entry."}},"additionalProperties":false,"required":["id","postingDate","status","lastModifiedDate","lines"]},"description":"The journal entries that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more entries remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchJournalEntriesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the journal entry with this identifier."},"bookId":{"type":"string","description":"Limits results to entries in this accounting book. See id on GET accounting/books/:id."},"status":{"type":"string","description":"Limits results to entries with this posting status. Accepted values: 'posted', 'unposted', 'voided'. Any other value matches no entry."},"type":{"type":"string","description":"Limits results to entries of this origin type, for example 'manual' or 'invoice'."},"name":{"type":"string","description":"Limits results to entries whose name contains this text. The match is case-insensitive."},"description":{"type":"string","description":"Limits results to entries whose description contains this text. The match is case-insensitive."},"postingDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive start of the posting-date window. Use format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive end of the posting-date window. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"A window on the posting date. Both bounds are inclusive. Omit a bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A journal entry must match every filter you send. Omit to return all journal entries."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of entries per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"getDebitMemoOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo."},"debitMemoNumber":{"type":"string","description":"The debit memo number, for example 'DM-1'. Absent while none has been assigned."},"creditMemoId":{"type":"string","description":"The source credit memo this debit memo settles. Absent on a standalone debit memo. See id on GET accounting/credit-memos/:id."},"creditMemoNumber":{"type":"string","description":"The number of the source credit memo. Present whenever creditMemoId is."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo was issued. Format YYYY-MM-DD."},"dueDate":{"type":"string","format":"date","description":"The date the debit memo falls due. Format YYYY-MM-DD. Computed from debitMemoDate plus the payment term's days."},"taxDate":{"type":"string","format":"date","description":"The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate."},"approvalStatus":{"type":"string","description":"The approval status of the debit memo. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved debit memo has financial effect."},"debitMemoStatus":{"type":"string","description":"The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'disputed'. Absent before approval."},"debitMemoType":{"type":"string","description":"The reason key for the charge, for example 'orderEntryError'. The accepted keys are configured per tenant."},"currency":{"type":"string","description":"The currency of the debit memo. Format ISO 4217, for example 'USD'. It governs every amount on the record."},"customerId":{"type":"string","description":"The customer the debit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer."},"customerNumber":{"type":"string","description":"The customer number."},"entityId":{"type":"string","description":"The legal entity that issued the debit memo. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"paymentTerm":{"type":"string","description":"The payment-term key applied to the debit memo. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"customerMessage":{"type":"string","description":"A free-text message shown to the customer on the document."},"externalDebitMemoId":{"type":"string","description":"The identifier of this debit memo in an external source system."},"isMigrated":{"type":"boolean","description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed."},"debitGlAccountId":{"type":"string","description":"The general ledger account the journal entry debits for the debit memo's full amount. See id on GET accounting/accounts/:id."},"billToAddressId":{"type":"string","description":"The bill-to address on the document. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address on the document. There is no endpoint for it."},"subtotal":{"type":"string","format":"decimal","description":"The sum of the lines' pre-discount totals, in the debit memo currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total including tax, in the debit memo currency."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the debit memo currency."},"totalAmountDebited":{"type":"string","format":"decimal","description":"The gross amount debited, in the debit memo currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of the prorated discount amounts across all lines, in the debit memo currency."},"unappliedCreditAmount":{"type":"string","format":"decimal","description":"The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo line."},"lineNumber":{"type":"string","description":"The sequential line number within the debit memo."},"description":{"type":"string","description":"A free-text line description, shown to the customer."},"productId":{"type":"string","description":"The debited product. Absent on a free-text line. See id on GET accounting/products/:id."},"creditMemoLineId":{"type":"string","description":"The source credit memo line this line debits. See lines[].id on GET accounting/credit-memos/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit as it stood on the source credit memo line, in the debit memo currency."},"listPriceTotal":{"type":"string","format":"decimal","description":"The pre-discount line total, in the debit memo currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount from the source credit memo line, in the debit memo currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount as a percentage of the list price. A percentage, not an amount, so it has no currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency."},"amountDebited":{"type":"string","format":"decimal","description":"The amount debited for the line, in the debit memo currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount of the source credit memo line still available to debit, in the debit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"taxMode":{"type":"string","description":"How the line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code applied to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. See id on GET accounting/accounts/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the debit memo, each debiting one line of the source credit memo. An empty array when the debit memo has no lines. All line amounts are in the debit memo currency."}},"additionalProperties":false,"required":["id","debitMemoDate","debitMemoType","currency","customerId","entityId","paymentTerm","billToAddressId","soldToAddressId","lastModifiedDate"]},"chartsOfAccountsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the chart of accounts."},"name":{"type":"string","description":"The display name of the chart of accounts."},"accountNumbering":{"type":"string","description":"How account numbers are assigned within this chart of accounts. Possible values: 'hierarchical' (numbers follow the account's position in the hierarchy), 'manual' (numbers are assigned by hand)."},"accountNumberingDigits":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The total width of an account number, which caps how deep the hierarchy can go. Possible values: 'sixDigits' (up to 4 levels), 'sevenDigits' (5), 'eightDigits' (6), 'nineDigits' (7), 'tenDigits' (8). Absent when no width was set. A width and the numbering strategy are independent, so check this field directly rather than inferring it from accountNumbering."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the chart of accounts. Absent when none was set."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the chart-of-accounts record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"priceBooksRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book."},"priceBookName":{"type":"string","description":"The display name of the price book, unique within the tenant and compared case-insensitively."},"priceBookNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The price book number, for example 'PB-000123'. Absent until a number range assigns one."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the price book. Absent when none is set."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the price book is active and usable in transactions."},"isStandard":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this is the standard (default) price book. Only one price book is the standard at a time. It cannot be set through this API."},"dataSource":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system that provided the price book data. Absent when none is set."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the price book was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the price book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"startInvoiceRunOutput":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created invoice run."},"invoiceRunNumber":{"type":"string","description":"The invoice run number, for example 'ISR-1042'."},"status":{"type":"string","description":"The execution status of the run. On an async call it is 'created' or 'running'. With 'sync' set to true it is settled: 'completed', 'error', or 'completeAndError' when some invoices were created and some lines failed."},"invoicesCreated":{"type":"number","description":"The number of invoices the run has created so far. Meaningful once the run has settled. 0 on an async call that has not finished."},"unresolvedRunId":{"type":"string","description":"The unique identifier for an earlier failed run, present only when this run could produce nothing because that run's failed lines are held back. Rerun that one rather than repeating this call."},"deduplicated":{"type":"boolean","description":"True when an identical run was already in flight and this call joined it instead of starting a second. The id above is that run's. Absent when this call started the run."}},"additionalProperties":false,"required":["id","invoiceRunNumber","status","invoicesCreated"],"description":"The invoice run that was started.","examples":[{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completed","invoicesCreated":3}]}},"additionalProperties":false,"required":["data"]},"startInvoiceRunInput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order to bill. Give exactly one of 'salesOrderId', 'customerId' or 'entityId'. Alone, it bills every pending line on the order. See id on GET accounting/sales-orders/:id.","examples":["8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39"]},"customerId":{"type":"string","description":"The customer to bill, across all their sales orders. Give exactly one of the three targets. Requires 'billUpTo'. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity to bill, across every approved order in it. This is the scope the scheduled nightly run uses, and the broadest this API offers. Give exactly one of the three targets. Requires 'billUpTo'. See id on GET base/entities."},"billingDates":{"type":"array","items":{"type":"string","format":"date"},"description":"The exact planned dates to bill, for sales-order runs only. Use format YYYY-MM-DD. Only planned invoicing lines on these dates are billed. Omit to bill every pending line on the order. Not accepted on a customer or entity run, which uses billUpTo instead."},"billUpTo":{"type":"string","format":"date","description":"Customer and entity runs only. Bills everything planned on or before this date, an upper bound rather than an exact match. Use format YYYY-MM-DD. Required on both. Rejected on a sales-order run, which names exact dates instead."},"invoiceDate":{"type":"string","format":"date","description":"The date stamped on the invoices created. Use format YYYY-MM-DD. Defaults to today. Must fall in an open accounting period.","examples":["2026-09-30"]},"scope":{"type":"array","items":{"enum":["all","oneTimeAndRecurring","usageInArrears","billableProducts"]},"description":"The line types to bill. Defaults to all line types. 'oneTimeAndRecurring' covers one-time, recurring and commit lines. 'billableProducts' covers billable time, travel and expense, and pass-through."},"sync":{"type":"boolean","description":"Whether to block until the run has settled and report its final status and count. Defaults to false, which returns immediately with 'status' of 'running' for you to poll. Use it for one sales order, not for a customer-wide run.","examples":[true]}},"additionalProperties":false},"updateRefundOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the refund.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'.","examples":["REF-1042"]},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD.","examples":["2026-08-01"]},"approvalStatus":{"type":"string","description":"The approval status after the change. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'.","examples":["pendingApproval"]},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'.","examples":["ach"]},"currency":{"type":"string","description":"The currency of the refund. Every amount on it is in this currency. Format ISO 4217, for example 'USD'.","examples":["USD"]},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency.","examples":["175.00"]},"customerId":{"type":"string","description":"The customer receiving the refund. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"entityId":{"type":"string","description":"The legal entity issuing the refund. See id on GET base/entities.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T10:02:11.000Z"]}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"updateRefundInput":{"type":"object","properties":{"refundDate":{"type":"string","format":"date","description":"The new issue date. Use format YYYY-MM-DD. Must fall in an open accounting period. Omit to leave it unchanged."},"refundType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The new payment method. Omit to leave it unchanged."},"refundNote":{"type":"string","description":"A new free-form note. Omit to leave it unchanged."},"amount":{"type":"string","format":"decimal","description":"The new refund amount, in the refund currency. Must be greater than 0. Omit to leave it unchanged.","examples":["175.00"]}},"additionalProperties":false},"searchUsageOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the usage record."},"usageNumber":{"type":"string","description":"The usage number, unique within the tenant. Absent while none has been assigned."},"usageIdentifier":{"type":"string","description":"The external identifier for this usage record, as supplied at ingestion."},"date":{"type":"string","format":"date-time","description":"The date and time the usage occurred, without a time zone. Format YYYY-MM-DDTHH:mm:ss."},"description":{"type":"string","description":"A free-form description of the usage record. Absent when none is set."},"productIdentifier":{"type":"string","description":"The product code or identifier this usage is attributed to, as supplied at ingestion."},"billableComponentId":{"type":"string","description":"The billable component this usage is attributed to. Absent until it is resolved. There is no endpoint for it."},"usageComponent":{"type":"string","description":"The billable component's name or identifier, included so you do not need a second read."},"quantity":{"type":"string","format":"decimal","description":"The quantity of usage recorded, in unitOfMeasure."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit for this usage. This record has no currency field. The currency is on the subscription or contract this usage bills against."},"status":{"type":"string","description":"The lifecycle status of the usage record. Possible values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'."},"usagePeriodId":{"type":"string","description":"The unique identifier for the usage period this record belongs to. There is no endpoint for it."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"Custom data recorded on this usage record, as a JSON object. Absent when none was set."},"orderIndex":{"type":"number","description":"The position of this usage record within the batch it was created in. Absent when not known."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the usage record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","date","quantity","unitPrice","status","usagePeriodId","lastModifiedDate"]},"description":"The usage records on this page, newest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more usage records remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchUsageInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the usage record with this identifier."},"usageNumber":{"type":"string","description":"Limits results to the usage record with this usage number."},"usageIdentifier":{"type":"string","description":"Limits results to usage records with this external identifier."},"productIdentifier":{"type":"string","description":"Limits results to usage records with this product code or identifier."},"status":{"type":"string","description":"Limits results to usage records with this status. Accepted values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'. Any other value matches nothing."},"unitOfMeasure":{"type":"string","description":"Limits results to usage records in this unit, for example 'Hour', 'GB' or 'Call'."},"usagePeriodId":{"type":"string","description":"Limits results to usage records in the usage period with this identifier. An identifier matching no usage period returns an empty page."},"billableComponentId":{"type":"string","description":"Limits results to usage records attributed to the billable component with this identifier. An identifier matching no billable component returns an empty page."},"date":{"type":"object","properties":{"start":{"type":"string","description":"The earliest date to include. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ. A time zone is converted to UTC before matching."},"end":{"type":"string","description":"The latest date to include. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ. A time zone is converted to UTC before matching."}},"additionalProperties":false,"description":"Limits results to usage records whose date falls in this range. Omit either bound to leave that side open. Both bounds are inclusive."}},"additionalProperties":false,"description":"The filters to apply. A usage record must match every filter you send. Omit to return all usage records."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of usage records per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"voidBankEntryOutput":{"type":"object","properties":{},"additionalProperties":false},"voidBankEntryInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the entry is being voided. It is stored on the entry for the audit trail. An empty or whitespace-only string is refused.","examples":["Duplicate of BE-4471"]}},"additionalProperties":false,"required":["voidReason"]},"productLinesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product line."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the product. See productName on GET accounting/products/:id."},"productLineNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product line number, assigned by the system and unique within the tenant. Example: 'PL-1001'."},"name":{"type":"string","description":"The name of the product line."},"lineType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of product line. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"priceModel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the product line is priced. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"pricingTerm":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The pricing term of the product line. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"invoiceFrequency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How often the product line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"unitOfMeasure":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit the product line's quantities are measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"taxMode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the product line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'. Absent if no tax provider was enabled in your tenant when the product line was last saved."},"enforceListPrice":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"hasUsage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the product line has a paired 'usage' line. True for 'prepaid' lines, and for 'recurring' lines whose priceModel is 'thresholdBased' or whose commitInvoicing has a value."},"hasBeenUsed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the product line is on at least one sales order."},"commitInvoicing":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the minimum spend commit of a 'recurring' product line is invoiced. Possible values: 'advance', 'arrears'. Absent when the product line has no minimum spend commit."},"prepaidBalanceOverConsumptionBehavior":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative', 'overage'. Applies only when lineType is 'prepaid'."},"prepaidBalanceRolloverAtRenewal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the remaining prepaid balance rolls over at renewal. Applies only when lineType is 'prepaid'."},"parentProductLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product line this 'usage' line is paired with. See id on GET accounting/product-lines/:id. Absent when the product line is not a paired 'usage' line."},"crmProductId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product line's identifier in an external CRM system."},"dataSource":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the product line was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product line last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchTrialBalanceOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The account this row reports on. See id on GET accounting/accounts/:id.","examples":["0383f7c4-6176-4dc3-89e7-48c49511070f"]},"accountNumber":{"type":"string","description":"The account number, as defined by the chart of accounts. Rows are ordered by it.","examples":["111101"]},"accountName":{"type":"string","description":"The name of the account. Absent when the account has none recorded.","examples":["Chase Checking"]},"accountType":{"type":"string","description":"The type of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'.","examples":["asset"]},"isGroupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Its four figures are the sums of its descendants and are already counted in its children's rows, so sum only the rows where this is false, or use totals.","examples":[false]},"parentAccountId":{"type":"string","description":"The grouping account this row rolls up into. Absent at the root of the chart of accounts. See id on GET accounting/accounts/:id.","examples":["64e38cef-4809-47b8-b014-59065920d070"]},"functionalStartingBalance":{"type":"string","format":"decimal","description":"The account's balance immediately before startDate, in reportingCurrency. Positive is a debit balance, negative a credit balance. Zero at the start of a fiscal year for an income or expense account, because the year-end rollover moves the prior year's result into retained earnings.","examples":["0"]},"functionalDebit":{"type":"string","format":"decimal","description":"Total debit movements within the window, in reportingCurrency. Always present, and zero when there was no movement. Never negative, because a reversal is booked as a credit.","examples":["5000701.99"]},"functionalCredit":{"type":"string","format":"decimal","description":"Total credit movements within the window, in reportingCurrency. Always present, and zero when there was no movement. Never negative.","examples":["503350.02"]},"functionalEndingBalance":{"type":"string","format":"decimal","description":"The account's balance at the close of endDate, in reportingCurrency. functionalEndingBalance = functionalStartingBalance + functionalDebit - functionalCredit.","examples":["4497351.97"]}},"additionalProperties":false,"required":["accountId","accountNumber","isGroupingAccount","functionalStartingBalance","functionalDebit","functionalCredit","functionalEndingBalance"]},"description":"One row per account that has a balance or a movement in scope, ordered by account number. The rows are the whole chart of accounts, so read isGroupingAccount before summing. An empty array when no account has a balance or movement in the window."},"totals":{"type":"object","properties":{"functionalStartingBalance":{"type":"string","format":"decimal","description":"The sum of functionalStartingBalance over the leaf rows. Zero in a balanced ledger.","examples":["0"]},"functionalDebit":{"type":"string","format":"decimal","description":"The sum of functionalDebit over the leaf rows. Equals functionalCredit when the report ties out.","examples":["6156388.01"]},"functionalCredit":{"type":"string","format":"decimal","description":"The sum of functionalCredit over the leaf rows.","examples":["6156388.01"]},"functionalEndingBalance":{"type":"string","format":"decimal","description":"The sum of functionalEndingBalance over the leaf rows. Zero in a balanced ledger.","examples":["0"]}},"additionalProperties":false,"required":["functionalStartingBalance","functionalDebit","functionalCredit","functionalEndingBalance"],"description":"The report's column totals, in reportingCurrency, summed over the leaf rows only. functionalDebit and functionalCredit here are the two figures a trial balance compares."},"tiesOut":{"type":"boolean","description":"Whether totals.functionalDebit equals totals.functionalCredit, computed from the figures in this response. When false, the response is still returned in full, with a TRIAL_BALANCE_DOES_NOT_TIE_OUT warning.","examples":[true]},"reportingCurrency":{"type":"string","description":"The currency every amount in this response is expressed in. Format ISO 4217, for example 'USD'. When consolidated is false this is the entity's own functional currency, and when true it is the consolidating parent's.","examples":["USD"]}},"additionalProperties":false,"required":["items","totals","tiesOut","reportingCurrency"]},"searchTrialBalanceInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity to report on. When consolidated is false, only this entity's own postings are included. When true, this is the consolidating parent and the report covers its whole hierarchy. Exactly one entity per request. See id on GET base/entities.","examples":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"]},"bookId":{"type":"string","description":"The accounting book to report on. It must belong to entityId. A book that belongs to another entity is reported as BOOK_NOT_FOUND. Exactly one book per request, because balances from different books are not comparable. See id on GET accounting/books/:id.","examples":["8d534b26-2998-40dd-8727-9fe3f89ff503"]},"consolidated":{"type":"boolean","description":"Whether to return the consolidated trial balance for entityId and its hierarchy. When true, subsidiary balances are translated into the parent's currency and intercompany eliminations are applied. When false, only this entity's own trial balance is returned, with no translation and no elimination.","examples":[false]},"startDate":{"type":"string","format":"date","description":"The inclusive start of the reporting window. Format YYYY-MM-DD. functionalStartingBalance is the position immediately before this date. Interpreted on the axis named by dateAxis.","examples":["2025-01-01"]},"endDate":{"type":"string","format":"date","description":"The inclusive end of the reporting window. Format YYYY-MM-DD. functionalEndingBalance is the position at the close of this date. Interpreted on the axis named by dateAxis.","examples":["2025-12-31"]},"dateAxis":{"enum":["postingDate","accountingPeriod"],"description":"Which axis the reporting window is measured on. 'postingDate' counts a movement on the date it was booked, the axis audit and reconciliation want. 'accountingPeriod' counts it in the period it was booked into, where budget comparisons belong. There is no default, because the two axes genuinely disagree for a line booked into an earlier period.","examples":["postingDate"]}},"additionalProperties":false,"required":["entityId","bookId","consolidated","startDate","endDate","dateAxis"]},"readGeneralLedgerOutput":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"lineOrigin":{"enum":["posted","retainedEarnings","elimination","cta","ctaElimination"],"description":"What kind of line this is, and the only field always present. 'posted' is a persisted journal entry line. The rest are derived by the ledger. 'elimination', 'cta' and 'ctaElimination' appear only when consolidated is true."},"accountId":{"type":"string","description":"The account this line posts to. A derived line lands on the offset account configured for its accounting process, so this is always set. Resolve it in dimensions.accounts."},"entityId":{"type":"string","description":"The entity this line belongs to. Resolve it in dimensions.entities."},"postingPeriodId":{"type":"string","description":"The accounting period this line is booked into. Resolve it in dimensions.periods."},"postingDate":{"type":"string","format":"date","description":"The posting date. Format YYYY-MM-DD. For a derived line this is the date the ledger assigns it, usually the end of the period it balances."},"bookId":{"type":"string","description":"The accounting book this line belongs to. Resolve it in dimensions.books."},"journalEntryLineId":{"type":"string","description":"The unique identifier for the posted journal entry line. Present only when lineOrigin is 'posted'."},"journalEntryId":{"type":"string","description":"The journal entry this line belongs to. Present only when lineOrigin is 'posted'. See id on GET accounting/journal-entries/:id."},"journalEntryLineReference":{"type":"string","description":"A human-readable reference to this line within its journal entry. Present only when lineOrigin is 'posted', and can be absent on some posted lines, as the INCOMPLETE_TRANSACTION_REFERENCES warning reports."},"transactionReference":{"type":"string","description":"A reference to the business transaction that produced this line. Present only when lineOrigin is 'posted', and can be absent, as INCOMPLETE_TRANSACTION_REFERENCES reports."},"lineType":{"type":"string","description":"The classification of this line within its journal entry, for example 'standard', 'tax', 'offset' or 'fxRoundingDifference'. A system-assigned value. Absent on a derived line."},"description":{"type":"string","description":"The line description."},"intercompanyPartnerId":{"type":"string","description":"The intercompany counterparty for this line. Set on an intercompany line."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this value is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'. Every custom dimension uses the code 'custom', and dimensions.reportingTagDimensions names which one a value belongs to."},"modelId":{"type":"string","description":"The dimension record this value points to, on the model that dimensionCode names."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"Every dimension value on this line, one entry each: department, business unit, value center, employee, customer and vendor, alongside any custom dimension. Absent when the line has no dimension, which is normal for a derived line. Resolve each entry in dimensions.reportingTagDimensions."},"transactionalCurrency":{"type":"string","description":"The currency the business event happened in. Format ISO 4217, for example 'USD'. Absent on a derived line, which has no transactional amount."},"transactionalDebit":{"type":"string","format":"decimal","description":"The debit in the transactional currency. A line has either a debit or a credit, not both."},"transactionalCredit":{"type":"string","format":"decimal","description":"The credit in the transactional currency. A line has either a debit or a credit, not both."},"transactionalAmount":{"type":"string","format":"decimal","description":"transactionalDebit minus transactionalCredit. Negative for a net credit. To read it in an account's natural direction, with revenue and expense both positive, multiply by the sign that normalBalance implies on the account in dimensions.accounts."},"functionalDebit":{"type":"string","format":"decimal","description":"The debit in the posting entity's own currency. The currency is functionalCurrency on the entity in dimensions.entities, since it does not vary per line."},"functionalCredit":{"type":"string","format":"decimal","description":"The credit in the posting entity's own currency."},"functionalAmount":{"type":"string","format":"decimal","description":"functionalDebit minus functionalCredit."},"functionalExchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the transactional amount into the functional currency. Absent on a derived line, which has no transactional amount."},"consolidatedDebit":{"type":"string","format":"decimal","description":"The debit in the consolidating parent's currency. Present only when consolidated is true. The currency is consolidationCurrency at the top of this response, since it is the same for every line."},"consolidatedCredit":{"type":"string","format":"decimal","description":"The credit in the consolidating parent's currency. Present only when consolidated is true."},"consolidatedAmount":{"type":"string","format":"decimal","description":"consolidatedDebit minus consolidatedCredit. Present only when consolidated is true."},"consolidationExchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the functional amount into the consolidation currency. Which rate this is depends on the account's exchangeRateType in dimensions.accounts. Present only when consolidated is true."},"preConsolidationAccountId":{"type":"string","description":"The account this line was posted to before consolidation account mapping. Present only when consolidated is true and the account was mapped. Resolve it in dimensions.accounts, which contains both the mapped and the pre-consolidation accounts."},"preConsolidationEntityId":{"type":"string","description":"The child entity that posted this line, before it rolled into the parent. Present only when consolidated is true. Resolve it in dimensions.entities."},"preConsolidationPostingPeriodId":{"type":"string","description":"The period this line sat in before it was re-dated into the parent's fiscal calendar. Differs from postingPeriodId when the parent and child keep different calendars. Present only when consolidated is true. Resolve it in dimensions.periods."}},"additionalProperties":false,"required":["lineOrigin","accountId","entityId","postingPeriodId","postingDate","bookId"]},"description":"The ledger's movements, ordered by posting date, then journal entry, then line. The ids on each line resolve in dimensions. A posted line has journalEntryLineId and journalEntryId to reach the underlying record. A derived line is computed per request and has no id of its own."},"dimensions":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account. See id on GET accounting/accounts/:id."},"accountNumber":{"type":"string","description":"The account number."},"accountName":{"type":"string","description":"The name of the account."},"accountType":{"type":"string","description":"The top-level classification of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'."},"accountSubType":{"type":"string","description":"A finer classification within accountType. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Absent when none is assigned."},"normalBalance":{"enum":["debit","credit"],"description":"Whether the account's natural direction is a debit or a credit. Multiply a signed amount by +1 for 'debit' and -1 for 'credit' to read it with revenue and expense both positive."},"exchangeRateType":{"enum":["current","average","historical"],"description":"Which rate translates this account's functional amounts into the consolidation currency."}},"additionalProperties":false,"required":["id","accountNumber","accountName","accountType","normalBalance"]},"description":"The accounts referenced by any line, including pre-consolidation source accounts. The field names follow the accounts endpoint, so you can join the two without a mapping table."},"entities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entity. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the entity."},"functionalCurrency":{"type":"string","description":"The entity's own currency, the currency of every functional amount on its lines. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","entityName"]},"description":"The entities referenced by any line, including pre-consolidation child entities."},"periods":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the accounting period. See accountingPeriodId on GET accounting/accounting-periods."},"periodName":{"type":"string","description":"The period name, as its fiscal calendar defines it."},"fiscalYear":{"type":"string","description":"The fiscal year this period belongs to."},"startDate":{"type":"string","format":"date","description":"The first day of the period. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id","periodName","fiscalYear","startDate","endDate"]},"description":"The accounting periods referenced by any line, including pre-consolidation periods."},"books":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the accounting book. See id on GET accounting/books/:id."},"name":{"type":"string","description":"The name of the book."},"bookType":{"enum":["full","adjustment"],"description":"Whether this book is a full book or an adjustment book. An adjustment book has only the deltas layered over its base book, so read it together with its base and add the two rather than read either alone."},"accountingStandard":{"type":"string","description":"The accounting standard this book reports under, by name, for example 'IFRS', 'US GAAP' or a local standard. A tenant defines its own standards, so treat an unrecognized value as data rather than an error. Absent on a book that declares none."}},"additionalProperties":false,"required":["id","name","bookType"]},"description":"The books referenced by any line: the requested book, and its base book when an adjustment book was requested."},"reportingTagDimensions":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this record is for, matching the dimensionCode on the lines' reportingTags. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this entry describes, matching the modelId on the lines' reportingTags. The pair (dimensionCode, modelId) is the key."},"code":{"type":"string","description":"The record's own business code, such as a department number, a customer number or a value center code. Absent for a dimension that keeps no code."},"name":{"type":"string","description":"The display name of the dimension record."},"customDimensionId":{"type":"string","description":"The custom dimension this record belongs to. Present only for a 'custom' value, where several dimensions share one model and are told apart only by this. See id on GET base/custom-dimensions."}},"additionalProperties":false,"required":["dimensionCode","modelId","name"]},"description":"Every dimension record referenced by a reportingTags entry on any line, named once however many lines reference it. One list for every dimension: department, business unit, value center, employee, customer, vendor, team, location, region and the custom dimensions all resolve here, so adding a dimension adds entries rather than a collection. A record that has since been deactivated is still named, because a posted line legitimately references one."}},"additionalProperties":false,"description":"Display values for the ids on the lines, each appearing once however many lines reference it. A collection is present only when its name was in the dimensions input, which defaults to all of them. Accounts, entities and periods contain both the consolidated and the pre-consolidation records, so every id on every line resolves."},"consolidationCurrency":{"type":"string","description":"The consolidating parent's currency, the currency of every consolidated amount in this response. Stated once because it is the same for every line. Format ISO 4217, for example 'USD'. Present only when consolidated is true."}},"additionalProperties":false,"required":["lines","dimensions"]},"readGeneralLedgerInput":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book to read. Exactly one book per request. An adjustment book automatically includes its base book. See id on GET accounting/books/:id."},"entityId":{"type":"string","description":"The entity to read. When consolidated is false, this is the posting entity. When true, this is the consolidating parent, and the response covers its whole hierarchy, with each line also carrying preConsolidationEntityId naming the child that posted it. Exactly one entity per request. See id on GET base/entities."},"consolidated":{"type":"boolean","description":"Whether to return the consolidated ledger for entityId and its hierarchy. When true, amounts are also translated into the parent's currency and elimination and CTA lines appear. When false, this returns the entity's own ledger with no translation, elimination or CTA."},"postingDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive start of the window. Use format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive end of the window. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["start","end"],"description":"A window on the posting date, the date a line was booked. Supply exactly one of postingDate or accountingPeriod. Both bounds are inclusive. The window may span at most 366 days."},"accountingPeriod":{"type":"object","properties":{"startPeriodId":{"type":"string","description":"The first accounting period in the window. See accountingPeriodId on GET accounting/accounting-periods."},"endPeriodId":{"type":"string","description":"The last accounting period in the window, read the same way."}},"additionalProperties":false,"required":["startPeriodId","endPeriodId"],"description":"A window on the accounting period, the period a line was booked into. Supply exactly one of postingDate or accountingPeriod. Both bounds are inclusive. The resolved period dates may span at most 366 days."},"filters":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"},"description":"Restrict to these accounts. Naming a derived line's offset account returns that line with its amount computed across all accounts. Omitting it drops the line, so a partial CTA is never returned. See id on GET accounting/accounts/:id."},"lineOrigins":{"type":"array","items":{"enum":["posted","retainedEarnings","elimination","cta","ctaElimination"]},"description":"Restrict to these kinds of line. Omit for all kinds. Pass ['posted'] for posted journal entry lines only, excluding everything the ledger derives."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this filter is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this filter points to, on the model that dimensionCode names."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"Restrict to lines carrying all of these dimension values. This is the one dimension filter: every dimension is filtered here, whether the ledger stores it as a column, such as department, business unit, value center, employee, customer or vendor, or as a tag, such as a custom dimension, team, location or region. Naming two values of the same dimension matches nothing, since a line has one value per dimension. A value that does not exist matches nothing rather than failing."}},"additionalProperties":false,"description":"Narrows which lines are returned, pushed down into the ledger computation wherever the ledger can express it. Derived amounts stay honest: a filter naming a derived line's offset account, such as CTA, translation elimination or retained earnings, is computed across every line in scope, and a filter that excludes those accounts drops those lines rather than returning a partial figure. Because derived lines carry almost no dimensions, any dimension filter drops nearly every retained-earnings, elimination and CTA line, so the returned lines no longer sum to a balanced ledger and the response carries a RESULT_DOES_NOT_TIE_OUT warning. lineOrigins is applied to the computed result rather than pushed down, as are tags on a dimension the ledger does not index."},"dimensions":{"type":"array","items":{"enum":["accounts","entities","periods","books","reportingTagDimensions"]},"description":"Which dimension dictionaries to return in dimensions. Omit for all of them, or pass an empty array for none. This never changes the lines: every id is always present on every line. An unrecognized name fails input validation."}},"additionalProperties":false,"required":["bookId","entityId","consolidated"]},"bulkDeleteShipmentsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted shipments, in input order.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeleteShipmentsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the shipments to delete. If any is missing or is not in 'DRAFT' status, none are deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"createInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned.","examples":["INC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory increase.","examples":["August cycle count"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth and unitPrice does not apply. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"createInventoryIncreaseInput":{"type":"object","properties":{"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase, and every line is added to it. Required. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it to use the warehouse's owning entity. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. Defaults to today. It sets the posting period. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code explaining the adjustment. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"notes":{"type":"string","description":"Free text on the inventory increase.","examples":["August cycle count"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency. Greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the batch."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Use format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch, in the line's unit. The batch quantities of a line must add up to the line's quantity."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches making up this line's quantity. Required for a batch-tracked item, and the quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false},"description":"The serialized units, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity lands in. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number not on the line is rejected."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity","unitPrice"]},"description":"The lines of the inventory increase. At least one is required.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["locationId","lines"]},"bulkCreateUnitOfMeasuresOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created unit of measure."}},"additionalProperties":false,"required":["id"]},"description":"The created units of measure, in the same order as the input. Match entries to inputs by index. Read a record with GET inventory/unit-of-measures/:id when you need its stored state.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateUnitOfMeasuresInput":{"type":"object","properties":{"unitOfMeasures":{"type":"array","items":{"type":"object","properties":{"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. Required. It must be unique within the tenant and within this request."},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'."}},"additionalProperties":false,"required":["unitCode","unitName"]},"description":"The units of measure to create. If any entry is invalid, nothing is written and the whole call fails.","examples":[[{"unitCode":"KG","unitName":"Kilogram"},{"unitCode":"G","unitName":"Gram"}]]}},"additionalProperties":false,"required":["unitOfMeasures"]},"createLandedCostItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created landed cost item. Format: UUID.","examples":["9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"]}},"additionalProperties":false,"required":["id"]},"createLandedCostItemInput":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. See `id` on GET inventory/items/:id (getItem).","examples":["3d81e07c-95a2-4f63-b1c8-27e5a94d0b36"]},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. See `id` on GET accounting/accounts/:id (getAccount)."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'.","examples":["Weight"]},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type.","examples":["c4a90e21-7b35-4d18-9e02-6f13a85c7d40"]},"active":{"type":"boolean","description":"Whether the landed cost item is active. Defaults to true."}},"additionalProperties":false,"required":["allocationMode"]},"searchWarehousesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the warehouse."},"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. It is unique within the tenant."},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this warehouse."},"warehouseTypeId":{"type":"string","description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Absent when the warehouse allows every type. There is no endpoint for it."},"warehouseTypeName":{"type":"string","description":"The name of the warehouse type. Absent when the warehouse allows every document type."},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'."},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location."},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. When false, existing stock and history keep pointing at it and new documents cannot select it."},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse. Open purchase-order on-order quantity for the entity is attributed here for replenishment. At most one warehouse per entity is the primary receiving warehouse."},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box. Absent when unset."},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor. Absent when unset."},"city":{"type":"string","description":"The city or locality. Absent when unset."},"stateProvince":{"type":"string","description":"The state, province or region. Absent when unset."},"postalCode":{"type":"string","description":"The postal or ZIP code. Absent when unset."},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. Absent when unset."},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state. Absent when unset."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the warehouse record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","locationCode","entityId","name","inventoryLocationType","isActive"]},"description":"The warehouses on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","entityId":"81e8beb1-1415-4012-9012-8138580f43dc","entityName":"Acme GmbH","name":"Rotterdam Distribution Centre","inventoryLocationType":"WAREHOUSE","isActive":true,"isPrimaryReceiving":true,"addressLine1":"Waalhaven 12","city":"Rotterdam","postalCode":"3087 BM","countryCode":"NL","region":"Benelux","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more warehouses remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchWarehousesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"locationCode":{"type":"string","description":"Limits results to the warehouse with this location code. The match is exact. Codes are unique, so this matches at most one warehouse."},"name":{"type":"string","description":"Limits results to the warehouse with this site name. The match is exact. This filter is available only here, not on the collection."},"entityId":{"type":"string","description":"Limits results to the warehouses owned by the legal entity with this identifier. An identifier matching no entity returns an empty page, not an error. See id on GET base/entities."},"warehouseTypeId":{"type":"string","description":"Limits results to the warehouses assigned to the warehouse type with this identifier. An identifier matching no warehouse type returns an empty page. There is no endpoint for it."},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"Limits results to warehouses of this kind of location. It is also available as filter[inventoryLocationType] on the collection."},"isActive":{"type":"boolean","description":"Limits results to warehouses that can be selected on new documents when true, or to retired ones when false. Omit to match both."},"isPrimaryReceiving":{"type":"boolean","description":"Limits results to each entity's primary receiving warehouse when true, or excludes it when false. Omit to match both."},"city":{"type":"string","description":"Limits results to warehouses in this city. The match is exact. This filter is available only here, not on the collection."},"countryCode":{"type":"string","description":"Limits results to warehouses in this country. Format ISO 3166-1 alpha-2, for example 'NL'. The match is exact. This filter is available only here, not on the collection."},"region":{"type":"string","description":"Limits results to warehouses in this business region grouping. The match is exact. This filter is available only here, not on the collection."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to warehouses changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A warehouse must match every filter you send. Send an empty object to return all warehouses.","examples":[{"entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","isActive":true,"inventoryLocationType":"WAREHOUSE"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of warehouses per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"searchPurchaseReturnsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID."},"documentNumber":{"type":"string","description":"The purchase return number, for example 'PRTR-1043'."},"documentStatus":{"type":"string","description":"The status of the purchase return. Possible values: 'DRAFT', 'APPROVED', 'PREPARED', 'SHIPPED', 'COMMITTED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', 'COMPLETED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"The unique identifier of the receipt the purchase return was created against. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the receipt line or purchase order line that this line returns goods from. Format: UUID. `sourceDocumentLineType` says whether it is a receipt line or a purchase order line. See `lines[].id` on GET inventory/receipts/:id (getReceipt) or GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'InvPurchaseDeliveryLine' (a receipt line), 'PurchaseOrderLine' (a purchase order line)."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return."},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from, for purchase return lines that return goods from a purchase order line. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped, and when no purchase return line returns goods from a purchase order line."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The matching purchase returns in this response, with their lines. When more purchase returns match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"PRTR-1043","documentStatus":"COMMITTED","documentDate":"2026-08-20","returnType":"NORMAL","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","currency":"EUR","totalAmount":"96.00","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","quantity":"30.00"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchPurchaseReturnsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the purchase return with this document number. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to purchase returns with this status. The match is exact. Accepted values: 'DRAFT', 'APPROVED', 'PREPARED', 'SHIPPED', 'COMMITTED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', 'COMPLETED', 'CANCELLED'."},"returnType":{"type":"string","description":"Limits results to purchase returns of this type. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"Limits results to purchase returns for the legal entity with this unique identifier. Format: UUID. See `id` on GET base/entities (entities)."},"businessPartnerId":{"type":"string","description":"Limits results to purchase returns for the vendor with this unique identifier. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"locationId":{"type":"string","description":"Limits results to purchase returns with at least one line for the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"itemId":{"type":"string","description":"Limits results to purchase returns with at least one line for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"referenceNumber":{"type":"string","description":"Limits results to purchase returns with this reference. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to purchase returns whose `documentDate` is on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to purchase returns whose `documentDate` is on or before this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to purchase returns changed on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A purchase return must match every filter you send. Send an empty object to return all purchase returns.","examples":[{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentStatus":"COMMITTED","fromDate":"2026-08-01"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of purchase returns per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkDeleteInventoryIncreasesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted inventory increases, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteInventoryIncreasesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the inventory increases to delete. All or nothing: if any is missing or committed, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"createShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned.","examples":["SD-8841"]},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD.","examples":["2026-08-19"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The display name of that customer.","examples":["Bakker Retail B.V."]},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"shipmentCarrierName":{"type":"string","description":"The name of that carrier.","examples":["PostNL"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods.","examples":["3SABCD1234567"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment.","examples":["PO-BAKKER-4417"]},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it.","examples":["OPEN"]},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency.","examples":["960.00"]},"notes":{"type":"string","description":"Free text on the shipment.","examples":["Palletised"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createShipmentInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Required. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it and the first line's warehouse decides it. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The planned delivery date. Use format YYYY-MM-DD.","examples":["2026-08-19"]},"currency":{"type":"string","description":"The currency for every amount on the shipment. Format ISO 4217, for example 'EUR'. Omit it to use the currency of the legal entity's default accounting book, and creation fails when the entity has no default book.","examples":["EUR"]},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number.","examples":["3SABCD1234567"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment.","examples":["PO-BAKKER-4417"]},"notes":{"type":"string","description":"Free text on the shipment.","examples":["Palletised"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line must use the same warehouse. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to ship, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency. Omit it to take the price from the sales order line."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id. Naming it links the shipment to the order it fulfills."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch going out. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line ships from. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to ship, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches going out on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit going out. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line ships from. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units going out, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the goods from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines of the shipment. At least one is required.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","notes":"Ship complete"}]]}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"getSerialNumberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial number. Format: UUID.","examples":["c3f80a41-6d29-4b57-8e10-92a4d7b05f63"]},"serialNumber":{"type":"string","description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity.","examples":["SN-000418"]},"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number.","examples":["MFG-77-000418"]},"itemId":{"type":"string","description":"The unique identifier of the item this serial number belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["afb4492d-52fc-44c5-ab10-71ad4a615496"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["SERIAL-01"]},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse the unit is in, or was last in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-02"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the unit belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"inStock":{"type":"string","format":"decimal","description":"The current quantity of the unit in stock. It is 1 when the unit is in stock and 0 when it is not, including before the unit is received.","examples":["1"]},"isSold":{"type":"boolean","description":"Whether the unit has been sold.","examples":[false]},"cost":{"type":"string","format":"decimal","description":"The cost of the unit. Cost changes made after the unit is sold are in `afterSaleCost`.","examples":["250"]},"originalCost":{"type":"string","format":"decimal","description":"The cost of the unit when it was first received. While the unit is in stock, landed costs added later, such as freight or customs duty, raise it, and other revaluations can raise or lower it. When the unit is received again on a receipt or inventory increase after it left stock, it is reset to the cost on that document. A sales return or a canceled shipment does not reset it.","examples":["250"]},"afterSaleCost":{"type":"string","format":"decimal","description":"The total of the cost changes made to the unit after it was sold, such as a landed cost added later. Absent when the unit has had no cost changes since it was sold."},"currency":{"type":"string","description":"The currency of `cost`, `originalCost`, and `afterSaleCost`. Format: ISO 4217, for example 'USD'.","examples":["GBP"]},"lastCostChangeDate":{"type":"string","format":"date","description":"The date the `cost` or `afterSaleCost` of the unit last changed. It is the date the change was committed, not the date of the document. Format: YYYY-MM-DD."},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase receives the unit, it is the date entered for the unit on that document, or the document's date when none was entered. Each later receipt or inventory increase for the unit sets a new date. A warehouse transfer does not change the date, including a transfer between legal entities."},"active":{"type":"boolean","description":"Whether the serial number is active.","examples":[true]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the serial number record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the serial number record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"reasonCodesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the reason code.","examples":["7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"]},"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. It is unique within the tenant.","examples":["DAMAGE"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of what the reason code means. Absent when none was given.","examples":["Stock damaged in the warehouse"]},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the reason code can be selected on new documents. When false, existing documents keep it and new ones cannot select it.","examples":[true]},"requiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether documents using this reason code require approval before they take effect.","examples":[true]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the reason code record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change it.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"bulkDeleteBinsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the removed bin."}},"additionalProperties":false,"required":["id"]},"description":"The removed bins, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteBinsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the bins to remove. If any identifier matches nothing or its bin still holds stock, nothing is removed and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkCreateAccountDeterminationRulesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created rule. Format: UUID."}},"additionalProperties":false,"required":["id"]},"description":"The created rules, in the order you sent them.","examples":[[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateAccountDeterminationRulesInput":{"type":"object","properties":{"accountDeterminationRules":{"type":"array","items":{"type":"object","properties":{"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique."},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used."},"isActive":{"type":"boolean","description":"Whether the rule is active. Defaults to true."},"matching":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"The unique identifier of the accounting book this rule applies to. Format: UUID. Required for every rule: leaving it out returns BOOK_REQUIRED. See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"type":"string","description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' applies to every transaction type, the same as leaving the field out. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"required":["entityId"],"description":"The dimensions this rule applies to. If you leave out the item type, item category, location, or transaction type, the rule applies to every value of it."},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"type":"string","description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"type":"string","description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"type":"string","description":"The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"type":"string","description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"type":"string","description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"type":"string","description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"type":"string","description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"type":"string","description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"type":"string","description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"type":"string","description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"type":"string","description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"type":"string","description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"type":"string","description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"type":"string","description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"type":"string","description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"type":"string","description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches."},"reasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the twenty accounts can be overridden."}},"additionalProperties":false,"required":["reasonCodeId","accountId","parentAccountType"]},"description":"The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by `parentAccountType`. An inventory increase or decrease created by manufacturing that has its own offset account uses that account instead of an override. Each combination of `reasonCodeId` and `parentAccountType` can appear only once on a rule."}},"additionalProperties":false,"required":["ruleName","matching"]},"description":"The rules to create.","examples":[[{"ruleName":"Finished goods — receipts","priority":10,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}}]]}},"additionalProperties":false,"required":["accountDeterminationRules"]},"deleteReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]}},"additionalProperties":false,"required":["id"]},"createWarehouseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created warehouse.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]}},"additionalProperties":false,"required":["id"]},"createWarehouseInput":{"type":"object","properties":{"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. Required. It must be unique within the tenant.","examples":["WH-01"]},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'. Required.","examples":["Rotterdam Distribution Centre"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. Required. An unknown identifier fails the call with ENTITY_NOT_FOUND. See id on GET base/entities.","examples":["3f9c1e28-7b45-4d60-a913-5e07c286bd41"]},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location. Required.","examples":["WAREHOUSE"]},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. Defaults to true. Set it to false to stage a warehouse before it goes into use."},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse, where open purchase-order on-order quantity is attributed for replenishment. Defaults to false. At most one warehouse per entity is meant to be the primary receiving warehouse. It is not enforced, and setting it on a second warehouse is accepted.","examples":[true]},"warehouseTypeId":{"type":"string","description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Omit to allow every document type. An unknown identifier fails the call with WAREHOUSE_TYPE_NOT_FOUND. There is no endpoint for it."},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box.","examples":["Waalhaven 12"]},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality.","examples":["Rotterdam"]},"stateProvince":{"type":"string","description":"The state, province or region."},"postalCode":{"type":"string","description":"The postal or ZIP code.","examples":["3087 BM"]},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. It is not validated against the ISO list.","examples":["NL"]},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state.","examples":["Benelux"]}},"additionalProperties":false,"required":["locationCode","name","entityId","inventoryLocationType"]},"searchWarehouseTransfersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer."},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'."},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed."},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'."},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer line. updateLines and deleteLines address lines by it."},"itemId":{"type":"string","description":"The item being moved. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from, the document's warehouse applied to every line. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much moves, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"transferCost":{"type":"string","format":"decimal","description":"What one unit left the source warehouse at, in the transfer's currency. The valuation method sets it at commit. Absent on a draft."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit on an intercompany transfer, in the contractual currency. Supplied on create."},"totalTransferValue":{"type":"string","format":"decimal","description":"The line's total on an intercompany transfer, in the contractual currency: totalTransferValue = unitTransferValue x quantity. Written by the platform."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this line has come back on an intercompany return."},"status":{"type":"string","description":"The status of the line."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number. See id on GET inventory/batch-numbers/:id."},"batchNumber":{"type":"string","description":"The batch number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"What this batch moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The batches that make up the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number. See id on GET inventory/serial-numbers/:id."},"serialNumber":{"type":"string","description":"The serial number."},"quantity":{"type":"string","format":"decimal","description":"Always one, for a serialized unit."},"unitCost":{"type":"string","format":"decimal","description":"What this unit moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The serialized units that move."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"fromBinLocationCode":{"type":"string","description":"The code of that bin."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"toBinLocationCode":{"type":"string","description":"The code of that bin."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer. The collection GET inventory/warehouse-transfers returns lineCount in place of these."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The transfers on this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","documentNumber":"WTR-2292","documentStatus":"COMMITTED","transferType":"INTERCOMPANY","billingStatus":"NOT_BILLED","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more transfers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchWarehouseTransfersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the transfer with this number, for example 'WTR-2291'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to transfers with this status. Accepted values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"transferType":{"type":"string","description":"Limits results to transfers of this type. Accepted values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'."},"billingStatus":{"type":"string","description":"Limits results to transfers with this billing status. Accepted values: 'NOT_BILLED', 'BILLED'."},"entityId":{"type":"string","description":"Limits results to transfers whose goods leave this legal entity. See id on GET base/entities."},"toEntityId":{"type":"string","description":"Limits results to transfers whose goods go to this legal entity, on an intercompany transfer. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to transfers whose goods leave this warehouse. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"Limits results to transfers whose goods go to this warehouse. See id on GET inventory/warehouses/:id."},"itemId":{"type":"string","description":"Limits results to transfers with a line for this item. See id on GET inventory/items/:id."},"referenceNumber":{"type":"string","description":"Limits results to transfers with this reference. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to transfers dated on or after this date. Use format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to transfers dated on or before this date. Use format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to transfers changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A transfer must match every filter you send. Send an empty object to return all transfers.","examples":[{"transferType":"INTERCOMPANY","billingStatus":"NOT_BILLED"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of transfers per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"searchUnitOfMeasureGroupsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure group."},"name":{"type":"string","description":"The display name of the unit of measure group. Names are not unique."},"description":{"type":"string","description":"A free-form description of what the group covers. Absent when none was given."},"baseUnitOfMeasureId":{"type":"string","description":"The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Absent when the group has no lines. See id on GET inventory/unit-of-measures/:id."},"baseUnitCode":{"type":"string","description":"The code of the base unit of measure. Absent when the group has no lines."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the conversion line. This is what updateLines and deleteLines address on PATCH inventory/unit-of-measure-groups/:id, not the unit."},"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit of measure."},"unitName":{"type":"string","description":"The display name of that unit of measure."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It is always greater than zero, and 1 on the base unit's own line."},"isBaseUnit":{"type":"boolean","description":"Whether this line is for the group's own base unit of measure. Exactly one line has it, and its conversionFactor is 1."}},"additionalProperties":false,"required":["id","unitOfMeasureId","unitCode","unitName","conversionFactor","isBaseUnit"]},"description":"The group's conversion lines, ordered by line id. An empty array when the group has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the unit of measure group or its conversion lines last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","lines"]},"description":"The unit of measure groups on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846","name":"Packaging","description":"Eaches, boxes and pallets","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","baseUnitCode":"EA","lines":[{"id":"9f1b60d4-27ac-4e53-b8f1-05d3e79a2c68","unitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","conversionFactor":"1.00","isBaseUnit":true},{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"BOX","unitName":"Box","conversionFactor":"12.00","isBaseUnit":false}],"lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more unit of measure groups remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchUnitOfMeasureGroupsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Limits results to unit of measure groups with this name. The match is exact. Names are not unique, so this may match several groups."},"unitOfMeasureId":{"type":"string","description":"Limits results to unit of measure groups with a conversion line for this unit of measure, including groups where it is the base unit. See id on GET inventory/unit-of-measures/:id."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to unit of measure groups changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding, changing or removing a conversion line counts as a change to the group."}},"additionalProperties":false,"description":"The filters to apply. A unit of measure group must match every filter you send. Send an empty object to return all unit of measure groups.","examples":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of unit of measure groups per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"getPurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The purchase return number, for example 'PRTR-1043'.","examples":["PRTR-1043"]},"documentStatus":{"type":"string","description":"The status of the purchase return. Possible values: 'DRAFT', 'APPROVED', 'PREPARED', 'SHIPPED', 'COMMITTED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', 'COMPLETED', 'CANCELLED'.","examples":["COMMITTED"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD.","examples":["2026-08-20"]},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"type":"string","description":"The reference number of the purchase return.","examples":["RMA-4471"]},"originalReceiptId":{"type":"string","description":"The unique identifier of the receipt the purchase return was created against. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped.","examples":["96.00"]},"notes":{"type":"string","description":"Notes on the purchase return.","examples":["Damaged in transit"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-20T09:20:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-20T11:05:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the receipt line or purchase order line that this line returns goods from. Format: UUID. `sourceDocumentLineType` says whether it is a receipt line or a purchase order line. See `lines[].id` on GET inventory/receipts/:id (getReceipt) or GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'InvPurchaseDeliveryLine' (a receipt line), 'PurchaseOrderLine' (a purchase order line)."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"30.00","inventoryQuantity":"30.00","unitPrice":"3.20","functionalUnitPrice":"3.20","functionalLineTotal":"96.00","sourceDocumentLineId":"a3e7c915-62d4-4f08-b1a9-7d5c24e8f063","sourceDocumentLineType":"PurchaseOrderLine","notes":"Cracked casings"}]]},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from, for purchase return lines that return goods from a purchase order line. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped, and when no purchase return line returns goods from a purchase order line.","examples":[[{"receiptLineId":"6b02f4d8-91c3-4e57-a8f6-3c1d9e70b254","quantity":"20.00","unitCost":"3.20","totalCost":"64.00"},{"receiptLineId":"d81a5c37-0f6e-4b92-9c24-e5f7a3b18d06","quantity":"10.00","unitCost":"3.20","totalCost":"32.00"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"getItemCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item category.","examples":["a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"]},"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not unique: two categories can share a name, so use id to address one.","examples":["Hardware"]},"description":{"type":"string","description":"A free-form description of what the category covers. Absent when none was set.","examples":["Fasteners, fittings and tooling"]},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. When false the category is retired: existing items keep it and new ones cannot be assigned to it.","examples":[true]},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency.","examples":["6.50"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]},"parentId":{"type":"string","description":"The identifier of the category this one sits under. Absent for a top-level category. See id on GET inventory/item-categories/:id."}},"additionalProperties":false,"required":["id","name"]},"getItemAttributeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item attribute.","examples":["9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"]},"itemId":{"type":"string","description":"The identifier of the item carrying the attribute. See id on GET inventory/items/:id.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The item's code, for example 'WIDGET-01'. Echoed so the row can be rendered without reading the item.","examples":["WIDGET-01"]},"attributeId":{"type":"string","description":"The identifier of the attribute definition, for example the one named 'Colour'.","examples":["c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48"]},"attributeName":{"type":"string","description":"The attribute's name, for example 'Colour'.","examples":["Colour"]},"valueId":{"type":"string","description":"The identifier of the chosen value. Absent when the attribute has been assigned without a value.","examples":["2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03"]},"value":{"type":"string","description":"The chosen value's text, for example 'Red'. Absent when the attribute has been assigned without a value.","examples":["Red"]}},"additionalProperties":false,"required":["id","itemId","attributeId"]},"deleteTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted transfer order.","examples":["3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6"]}},"additionalProperties":false,"required":["id"]},"listItemAttributesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item attribute."},"itemId":{"type":"string","description":"The unique identifier for the item carrying the attribute. See id on GET inventory/items/:id."},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The item's code, for example 'WIDGET-01'."},"attributeId":{"type":"string","description":"The unique identifier for the attribute definition."},"attributeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The attribute's name, for example 'Colour'."},"valueId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the chosen value. Absent when the attribute has been assigned without a value."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The chosen value's text, for example 'Red'. Absent when the attribute has been assigned without a value."}},"additionalProperties":false},"shipmentCarriersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment carrier.","examples":["5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"]},"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. Names are not unique, so use id to address one carrier.","examples":["DHL Express"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the carrier can be selected on new shipments. Absent on carriers created before the active flag existed.","examples":[true]},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the vendor this carrier bills through. Absent when the carrier has no vendor. See id on GET accounting/vendors/:id.","examples":["d4a71e08-6b95-4f23-b7c1-52e08a936d47"]},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor this carrier bills through. Absent when the carrier has no vendor. It is resolved from the vendor at read time and is not stored on the carrier.","examples":["DHL International GmbH"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the carrier record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"commitInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the committed inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease, read back from the document. It is 'COMMITTED' on success. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The unique identifier for the journal entry the commit posted. Absent when posting produced none. See id on GET accounting/journal-entries/:id.","examples":["7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the posting, in practice soft bin-capacity breaches. An empty array on a clean commit. The commit succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitInventoryDecreaseInput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteWarehousesOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted warehouse."},"locationCode":{"type":"string","description":"The location code the deleted warehouse held."}},"additionalProperties":false,"required":["id","locationCode"]},"description":"The deleted warehouses, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteWarehousesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the warehouses to delete. If any identifier matches nothing or its warehouse is still in use, nothing is deleted and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"deleteUnitOfMeasureGroupOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted unit of measure group.","examples":["5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"]},"name":{"type":"string","description":"The display name the deleted unit of measure group held.","examples":["Weight"]}},"additionalProperties":false,"required":["id","name"]},"shipmentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned.","examples":["SD-8841"]},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The planned or actual delivery date. Format YYYY-MM-DD.","examples":["2026-08-19"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that customer.","examples":["Bakker Retail B.V."]},"shipmentCarrierId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"shipmentCarrierName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that carrier.","examples":["PostNL"]},"returnStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it.","examples":["OPEN"]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's own reference for the shipment.","examples":["SO-4471"]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The carrier's tracking number for the goods.","examples":["3STBJG7291043"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total value of the shipment, in the shipment's currency.","examples":["960.00"]},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines the shipment has. The collection does not return the lines themselves.","examples":[1]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the shipment.","examples":["Palletised"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]}},"additionalProperties":false},"updateUnitOfMeasureGroupOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure group.","examples":["2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"]}},"additionalProperties":false,"required":["id"]},"updateUnitOfMeasureGroupInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the unit of measure group. Omit to leave unchanged. It is not checked for uniqueness."},"description":{"type":"string","description":"A free-form description of what the group covers. Omit to leave unchanged."},"createLines":{"type":"array","items":{"type":"object","properties":{"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It must be greater than zero."}},"additionalProperties":false,"required":["unitOfMeasureId","conversionFactor"]},"description":"The conversion lines to add, each a full line with no id. A unit of measure the group already has a line for fails with DUPLICATE_UNIT_IN_GROUP, unless the same call also deletes that line, since deletes are applied first.","examples":[[{"unitOfMeasureId":"d1f7b204-53ea-4c98-8b16-7f420e93ac57","conversionFactor":"480.00"}]]},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the conversion line to change. Read it from the line's id on GET inventory/unit-of-measure-groups/:id, not the unit's id."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this line's unit. Omit to leave unchanged. It must be greater than zero."}},"additionalProperties":false,"required":["id"]},"description":"The conversion lines to change, each keyed by its own id. The remaining fields are optional, and omitting one leaves it unchanged. A line id belonging to another group fails with LINE_NOT_FOUND."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the conversion lines to remove. They are removed before createLines is applied, so one call can free a unit of measure and re-add it with a different factor. Removing every line, the base unit's included, leaves a group that has forgotten its base unit and can take no new lines."}},"additionalProperties":false},"searchBatchTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch transaction. Format: UUID."},"batchNumberId":{"type":"string","description":"The unique identifier of the batch this transaction is for. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse. Example: 'LOT-2026-08-14'."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. It shows the batch's current value, not the value at the time of the batch transaction. Format: YYYY-MM-DD."},"transactionId":{"type":"string","description":"The unique identifier of the inventory transaction this batch transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction)."},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure the batch transaction was recorded in. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure in `unitId`."},"transactionDate":{"type":"string","format":"date","description":"The date of the inventory transaction this batch transaction belongs to. Format: YYYY-MM-DD."},"inQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch that came into stock, in the item's stocking unit. It is 0 on an inventory revaluation, which changes the batch's cost without moving stock. Absent when stock went out."},"outQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch that went out of stock, in the item's stocking unit. Absent when stock came in or on an inventory revaluation."},"unitInQuantity":{"type":"string","format":"decimal","description":"The quantity that came into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit."},"unitOutQuantity":{"type":"string","format":"decimal","description":"The quantity that went out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"cost":{"type":"string","format":"decimal","description":"The unit cost of the batch, in the currency named by `currency`. When stock comes in, it is the unit cost of the stock received. When stock goes out, it is the batch's unit cost at that time. On an inventory revaluation, it is the batch's new unit cost."},"valueDelta":{"type":"string","format":"decimal","description":"The change in the total value of the batch's stock from this transaction, in the currency named by `currency`. A negative value is a decrease."},"currency":{"type":"string","description":"The currency that `cost` and `valueDelta` are in. Format: ISO 4217, for example 'USD'."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the batch transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the batch itself, such as its `expirationDate`, do not update this field."}},"additionalProperties":false,"required":["id","batchNumberId"]},"description":"The matching batch transactions in this response. When more batch transactions match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"500.00","cost":"3.75","valueDelta":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchBatchTransactionsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"Limits results to batch transactions for the batch with this unique identifier. Format: UUID. When you also send `batchNumber`, `batchNumber` is used instead. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"Limits results to batch transactions for batches with this batch number. The match is exact. The same batch number can be used for other items and in other warehouses, so the results can include more than one batch. When you also send `batchNumberId`, this filter is used instead. Example: 'LOT-2026-08-14'."},"itemId":{"type":"string","description":"Limits results to batch transactions for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to batch transactions for the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"fromDate":{"type":"string","format":"date","description":"Limits results to batch transactions with a `transactionDate` on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to batch transactions with a `transactionDate` on or before this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to batch transactions whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A batch transaction must match every filter you send. Send an empty object to return all batch transactions.","examples":[{"batchNumber":"LOT-2026-08-14"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of batch transactions per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"createInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'.","examples":["REV-1187"]},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.","examples":["revaluation"]},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit.","examples":["f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet.","examples":["-450"]},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation."},"lineCount":{"type":"number","description":"How many lines the revaluation has.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation line. Pass it in updateLines or deleteLines on PATCH inventory/inventory-revaluations/:id to change or remove the line."},"itemId":{"type":"string","description":"The unique identifier for the item being revalued. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock this line restates. The same item may be carried at a different cost in each warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates the cost of, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the revaluation's currency. You supply it and the platform checks it rather than deriving it. Read it from GET inventory/inventory-levels."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the revaluation's currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document, in the revaluation's currency. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize, in the revaluation's currency. Moving-average direct cost capitalization only."},"revaluationAmount":{"type":"string","format":"decimal","description":"The value this line moves on the balance sheet, in the revaluation's currency: (newUnitCost - currentUnitCost) x quantity."},"status":{"type":"string","description":"Where the line sits in the platform's own process. This is free text with no fixed set of values."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number."},"batchNumber":{"type":"string","description":"The batch number itself."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number."},"serialNumber":{"type":"string","description":"The serial number itself."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document. Direct cost capitalization on a sold serial only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit, so there must be exactly as many as the quantity says."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the created revaluation.","examples":[[{"id":"6c2f9a41-7b58-4d30-91e6-4a0d8c25f3b7","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationCode":"WH-CENTRAL","unitCode":"EA","quantity":"150","currentUnitCost":"12","newUnitCost":"9","revaluationAmount":"-450"}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"createInventoryRevaluationInput":{"type":"object","properties":{"costingValuationType":{"type":"string","description":"How the value change is recorded. Accepted values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.","examples":["revaluation"]},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required, because the commit refuses a document without one.","examples":["f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Defaults to the entity that owns the first line's warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to date the revaluation. Defaults to today. Use format YYYY-MM-DD."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account the expense comes off. Required when costingValuationType is 'directCostCapitalisation'. See id on GET accounting/chart-of-accounts/:id."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the revaluation."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item to revalue. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates. Must be greater than zero."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the legal entity's functional currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize. Moving-average direct cost capitalization only."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity","currentUnitCost","newUnitCost"]},"description":"The lines of the revaluation. At least one is required.","examples":[[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","unitId":"d5a71e93-4c08-4b26-95f7-2e6a8c30b41f","quantity":"150","currentUnitCost":"12","newUnitCost":"9"}]]}},"additionalProperties":false,"required":["costingValuationType","costingElementTypeId","lines"]},"createTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"]},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'.","examples":["WTO-1043"]},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order.","examples":[1]},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. updateLines and deleteLines address a line by it."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from. See id on GET inventory/warehouses/:id. Absent while no source warehouse has been resolved, and such a line blocks the conversion."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Always greater than zero."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line is still to be transferred."},"processedQuantity":{"type":"string","format":"decimal","description":"How much of the line a transfer has already taken."},"status":{"type":"string","description":"The state of the line. 'NEEDS_SOURCE' means no source warehouse has been resolved, and the transfer order cannot be converted until it is."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the created transfer order.","examples":[[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"40","inventoryQuantity":"40","openQuantity":"40","status":"DRAFT"}]]}},"additionalProperties":false,"required":["id","documentStatus","lines"]},"createTransferOrderInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity. Defaults to the entity that owns the first line’s warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer order. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-18"]},"locationId":{"type":"string","description":"The warehouse the goods leave, for the transfer order as a whole. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"targetLocationId":{"type":"string","description":"The warehouse the goods go to, for the transfer order as a whole. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order, for example a replenishment run or a ticket number.","examples":["REPLEN-2026-33"]},"notes":{"type":"string","description":"Free text on the document."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse to draw from, required on a line. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse to deliver to. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. Defaults to the item's stocking unit. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line’s unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["itemId","locationId","targetLocationId","quantity"]},"description":"The lines of the transfer order. At least one is required.","examples":[[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"40"}]]}},"additionalProperties":false,"required":["lines"]},"getLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"documentNumber":{"type":"string","description":"The landed cost number, for example 'LC-1007'.","examples":["LC-1007"]},"documentStatus":{"type":"string","description":"The status of the landed cost. Possible values: 'DRAFT', 'COMMITTED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["7039b992-696a-40c7-a181-51759304ef83"]},"entityName":{"type":"string","description":"The name of the legal entity in `entityId`.","examples":["Flow UK"]},"currency":{"type":"string","description":"The currency of every amount on the landed cost, which is the functional currency of its legal entity. Format: ISO 4217, for example 'GBP'.","examples":["GBP"]},"notes":{"type":"string","description":"Free text on the landed cost."},"totalChargeAmount":{"type":"string","format":"decimal","description":"The total of the selected charges, in the landed cost's currency.","examples":["240"]},"receiptCount":{"type":"number","description":"The number of receipts on the landed cost.","examples":[1]},"chargeCount":{"type":"number","description":"The number of charges on the landed cost.","examples":[1]},"allocationLineCount":{"type":"number","description":"The number of allocation lines on the landed cost.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the landed cost was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the landed cost last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"receiptNumber":{"type":"string","description":"The receipt's number."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format: YYYY-MM-DD."},"documentStatus":{"type":"string","description":"The status of the receipt. See `documentStatus` on GET inventory/receipts/:id (getReceipt)."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the receipt line. Format: UUID. It is the `id` you send in `selectedLineIds`. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"isSelected":{"type":"boolean","description":"Whether the charges are spread over the line."},"itemId":{"type":"string","description":"The unique identifier of the item received on the line. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that received the stock on the receipt line. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of stock the receipt line brought in, in the unit of measure used on the receipt line. It is the quantity received, not the quantity in stock now. See `lines[].unitId` on GET inventory/receipts/:id (getReceipt)."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of stock the receipt line brought in, in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The price the line was received at, per unit, in the landed cost's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the landed cost's currency."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt. Every line is included, whether or not the charges are spread over it."}},"additionalProperties":false,"required":["id"]},"description":"The receipts whose stock the charges are spread over, with their lines.","examples":[[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","quantity":"40","unitPrice":"12","lineTotal":"480"}]}]]},"charges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"vendorBillId":{"type":"string","description":"The unique identifier of the vendor bill the line belongs to. Format: UUID. See `id` on GET accounting/vendor-bills/:id (getVendorBill)."},"vendorBillNumber":{"type":"string","description":"The vendor bill's number."},"itemId":{"type":"string","description":"The unique identifier of the item on the vendor bill line. Format: UUID. Absent when the line has no item. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`. When the vendor bill line has no item, the line's description is used."},"allocationMode":{"type":"string","description":"How this charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the charge this landed cost takes, in the landed cost's currency."},"allocatedAmount":{"type":"string","format":"decimal","description":"The amount of the charge that the commit used (allocated), in the landed cost's currency. After the commit, it equals `amount`. It is absent before the commit, and on charges whose `isSelected` is false."},"isSelected":{"type":"boolean","description":"Whether the charge is spread over the receipt lines. A charge set to false is kept in the landed cost's charges, but the commit does not spread it."}},"additionalProperties":false,"required":["id"]},"description":"The charges of the landed cost. Each charge comes from a line of a vendor bill.","examples":[[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}]]},"allocationLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the allocation line. It is a number sent as a string, not a UUID."},"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"itemId":{"type":"string","description":"The unique identifier of the item on the receipt line. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that received the stock on the receipt line. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"quantity":{"type":"string","format":"decimal","description":"The quantity received on the receipt line, in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item in the warehouse before the charges, in the landed cost's currency, at the time the landed cost was created or last updated. It is the item's average cost, or the receipt line's unit price when there is no average cost. When you commit the landed cost, the commit uses the item's cost at that moment, which can differ from this cost."},"additionalCostAmount":{"type":"string","format":"decimal","description":"This receipt line's share of the charges, in the landed cost's currency. It is the share for the whole line, not for one unit."},"newUnitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item with the charges, in the landed cost's currency. It is `currentUnitCost` plus this line's share of the charges for one unit. The share for one unit is `additionalCostAmount` divided by `quantity`. The commit can end with a different cost, because it uses the item's cost at the time of the commit."},"revaluationDocuments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the inventory revaluation. Format: UUID. See `id` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation)."},"documentNumber":{"type":"string","description":"The inventory revaluation number."},"documentStatus":{"type":"string","description":"The status of the inventory revaluation."}},"additionalProperties":false,"required":["id"]},"description":"The inventory revaluations that the commit created for this allocation line. It is empty before the commit. It has more than one inventory revaluation when the line's charges have different expense accounts or costing element types."}},"additionalProperties":false,"required":["id"]},"description":"The allocation of the charges over the receipt lines, with one allocation line for each selected receipt line that has an inventory item. It is calculated when the landed cost is created or updated.","examples":[[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"bulkDeleteAccountDeterminationRulesOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted rule. Format: UUID."},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique."}},"additionalProperties":false,"required":["id","ruleName"]},"description":"The deleted rules, in the order you sent their ids."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteAccountDeterminationRulesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the rules you want to delete. Format: UUID.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"getUnitOfMeasureOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. It is unique within the tenant.","examples":["KG"]},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'.","examples":["Kilogram"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the unit of measure record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","unitCode","unitName"]},"deleteWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]}},"additionalProperties":false,"required":["id"]},"updatePurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The purchase return number.","examples":["PRTR-1043"]},"documentStatus":{"type":"string","description":"The status of the purchase return. It is always 'DRAFT', because only a draft can be updated.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD.","examples":["2026-08-20"]},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"The unique identifier of the receipt the purchase return was created against. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return.","examples":["Vendor agreed collection for Friday"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the receipt line or purchase order line that this line returns goods from. Format: UUID. `sourceDocumentLineType` says whether it is a receipt line or a purchase order line. See `lines[].id` on GET inventory/receipts/:id (getReceipt) or GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'InvPurchaseDeliveryLine' (a receipt line), 'PurchaseOrderLine' (a purchase order line)."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"25.00"}]]},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from, for purchase return lines that return goods from a purchase order line. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped, and when no purchase return line returns goods from a purchase order line."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updatePurchaseReturnInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"notes":{"type":"string","description":"Notes on the purchase return.","examples":["Vendor agreed collection for Friday"]},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the line you want to change. Format: UUID."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It must belong to the purchase return's legal entity. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It must be greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It can be zero, but not less than zero."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned. To identify the batch, send `batchNumberId`. To take this batch from a bin, send the same value in `binLocations[].batchNumber`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch to return, in the item's stocking unit. It must be greater than zero."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned. To identify the unit, send `serialNumberId`. To take this unit from a bin, send the same value in `binLocations[].serialNumber`."}},"additionalProperties":false},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for. It must match the `batchNumber` of one of the line's batches."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for. It must match the `serialNumber` of one of the line's serials."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins to take the stock on this purchase return line from, with the quantity to take from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The purchase return lines to change, each identified by its `id`. A field you leave out keeps its current value. The exceptions are `batches`, `serials`, and `binLocations`, which are replaced as a set. When you send any of them, send all three, with every entry the line should have.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"25.00"}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It must belong to the purchase return's legal entity. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It must be greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It can be zero, but not less than zero."},"sourceDocumentLineId":{"type":"string","description":"The identifier of the receipt line or purchase order line that this line returns goods from. Send the line's unique identifier or its numeric `id`. Set `sourceDocumentLineType` to say which kind of line it is. See `lines[].id` on GET inventory/receipts/:id (getReceipt) or GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Defaults to 'InvPurchaseDeliveryLine'. Accepted values: 'InvPurchaseDeliveryLine' (a receipt line), 'PurchaseOrderLine' (a purchase order line)."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned. To identify the batch, send `batchNumberId`. To take this batch from a bin, send the same value in `binLocations[].batchNumber`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch to return, in the item's stocking unit. It must be greater than zero."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being returned. Required when the item is batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned. To identify the unit, send `serialNumberId`. To take this unit from a bin, send the same value in `binLocations[].serialNumber`."}},"additionalProperties":false},"description":"The serialized units being returned, one entry for each unit. Required when the item is serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for. It must match the `batchNumber` of one of the line's batches."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for. It must match the `serialNumber` of one of the line's serials."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins to take the stock on this purchase return line from, with the quantity to take from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["itemId","locationId","quantity"]},"description":"The lines to add to the purchase return."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the purchase return lines to remove. Format: UUID. Each identifier must be the `id` of a line of this purchase return.","examples":[["d0a7e3b5-2f61-4c98-b704-1a5e9c86d243"]]}},"additionalProperties":false},"searchItemTypesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item type."},"name":{"type":"string","description":"The display name of the item type, for example 'Stocked good'. Two item types cannot share a name."},"description":{"type":"string","description":"A free-form description of the item type."},"procurable":{"type":"boolean","description":"Whether items of this type can appear on purchase documents."},"stockable":{"type":"boolean","description":"Whether items of this type hold stock."},"active":{"type":"boolean","description":"Whether the item type can be chosen for new items."},"itemCount":{"type":"number","description":"The number of items that name this item type."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the item type was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the item type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The item types on this page, oldest first. An empty array when nothing matches.","examples":[[{"id":"b1d47e29-3c86-4a05-9f72-04e5c13b8a60","name":"Service","description":"Bought but never stocked","procurable":true,"stockable":false,"active":true,"itemCount":7,"lastModifiedDate":"2026-08-18T09:15:02.108Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more item types remain beyond this page."}},"additionalProperties":false,"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchItemTypesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Limits results to the item type with this name. The match is exact. Names are unique, so this matches at most one item type."},"procurable":{"type":"boolean","description":"Limits results to item types with the given procurable value."},"stockable":{"type":"boolean","description":"Limits results to item types with the given stockable value."},"active":{"type":"boolean","description":"Limits results to item types with the given active value."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to item types changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. An item type must match every filter you send. Send an empty object to return all item types.","examples":[{"stockable":false}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of item types per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"searchItemsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item."},"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Unique within the tenant. It is set when the item is created and cannot be changed."},"itemName":{"type":"string","description":"The display name of the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"notes":{"type":"string","description":"Free text on the item."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image. Absent when none is set."},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It is set when the item is created and cannot be changed. See id on GET inventory/item-types/:id."},"itemTypeName":{"type":"string","description":"The display name of the item's type."},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id."},"categoryName":{"type":"string","description":"The display name of the item's category."},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction is in this unit. See id on GET inventory/unit-of-measures/:id."},"inventoryUnitCode":{"type":"string","description":"The code of the inventory unit."},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"salesUnitCode":{"type":"string","description":"The code of the sales unit."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitCode":{"type":"string","description":"The code of the purchase unit."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. See id on GET inventory/unit-of-measure-groups/:id."},"unitGroupName":{"type":"string","description":"The display name of the unit of measure group."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Possible values: 'movingAverage', 'batch', 'serials', 'none'. 'none' is for an item that is not stocked. 'fifo' can be returned but cannot be written, because it is under development."},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Receipts and shipments of it name batches."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Receipts and shipments of it name one serial per unit."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. False for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. False means it is retired, and historical records keep it."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Absent when there is no restriction."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning, in the item's currency. It is not the value of the stock on hand. Read that from GET inventory/inventory-levels."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price, in the item's currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. A landed cost Weight allocation fails rather than falling back when an item on the receipt has none."},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Possible values: 'G', 'Kg', 'Lbs'."},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Possible values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge for this item falls back to when it names none. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest temperature the item can be stored at, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest temperature the item can be stored at, in degrees Celsius."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the item was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the item record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The items on this page, oldest first. An empty array when nothing matches.","examples":[[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","itemTypeName":"Stocked good","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","categoryName":"Components","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","inventoryUnitCode":"EA","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","unitGroupName":"Each","valuationMethod":"movingAverage","isBatch":false,"isSerial":false,"isInventory":true,"isSalesItem":true,"isPurchaseItem":true,"active":true,"weight":"1.4","weightUnit":"Kg","lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more items remain beyond this page."}},"additionalProperties":false,"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchItemsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"itemCode":{"type":"string","description":"Limits results to the item with this item code. The match is exact. Item codes are unique, so this matches at most one item."},"itemTypeId":{"type":"string","description":"Limits results to items with this item type. See id on GET inventory/item-types/:id."},"categoryId":{"type":"string","description":"Limits results to items in this category. See id on GET inventory/item-categories/:id."},"unitGroupId":{"type":"string","description":"Limits results to items in this unit of measure group. See id on GET inventory/unit-of-measure-groups/:id."},"valuationMethod":{"type":"string","description":"Limits results to items with this valuation method. Accepted values: 'movingAverage', 'batch', 'serials', 'none', 'fifo'. 'fifo' can be matched on read but cannot be written."},"isBatch":{"type":"boolean","description":"Limits results to items with the given isBatch value."},"isSerial":{"type":"boolean","description":"Limits results to items with the given isSerial value."},"isInventory":{"type":"boolean","description":"Limits results to items with the given isInventory value. False finds service and charge items."},"isSalesItem":{"type":"boolean","description":"Limits results to items with the given isSalesItem value."},"isPurchaseItem":{"type":"boolean","description":"Limits results to items with the given isPurchaseItem value."},"isPerishable":{"type":"boolean","description":"Limits results to items with the given isPerishable value."},"active":{"type":"boolean","description":"Limits results to items with the given active value. Omit to return both."},"externalItemId":{"type":"string","description":"Limits results to the item with this external identifier. The match is exact."},"brandName":{"type":"string","description":"Limits results to items with this brand name. The match is exact."},"countryOfOrigin":{"type":"string","description":"Limits results to items with this country of origin. The match is exact."},"missingWeight":{"type":"boolean","description":"True to return only items that have no weight, the items a landed cost Weight allocation would fail on."},"missingDimensions":{"type":"boolean","description":"True to return only items missing length, width or height, the items a landed cost Volume allocation would fail on."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to items changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. An item must match every filter you send. Send an empty object to return all items.","examples":[{"missingWeight":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of items per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"salesReturnsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales return number, for example 'SR-1042'. Assigned on create.","examples":["SR-1042"]},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"When the goods are expected back, or came back. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that customer.","examples":["Bakker Retail B.V."]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the return is valued in. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total value of the return, in the return's currency.","examples":["144.00"]},"returnFeeAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The fee withheld across the return, in the document's currency.","examples":["0.00"]},"returnType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the business classifies the return."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How many lines the return has. Published because the lines themselves are not.","examples":[1]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's own reference for the return, for example an RMA number."},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The carrier's tracking number for the returned goods."},"sourceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line, which GET inventory/sales-returns/:id and POST inventory/sales-returns/search return."},"sourceDocumentType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What kind of document that id refers to, for example 'SalesDelivery'."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the document.","examples":["Customer reports transit damage"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]}},"additionalProperties":false},"searchBatchNumbersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch number. Format: UUID."},"batchNumber":{"type":"string","description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse."},"manufacturerBatchNumber":{"type":"string","description":"The manufacturer's batch number."},"itemId":{"type":"string","description":"The unique identifier of the item this batch belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse the batch is in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"quantity":{"type":"string","format":"decimal","description":"The total quantity received into the batch, in the item's stocking unit. When a receipt, inventory increase, or inventory count creates the batch, it is 0 until the document that brings in the stock is committed. For a batch created by a production order, it does not show the quantity received, so use `inStock` instead. Unlike `inStock`, it does not change when stock leaves the batch or comes back on a sales return. Only canceling a receipt, inventory increase, or warehouse transfer that brought stock into the batch lowers it."},"inStock":{"type":"string","format":"decimal","description":"The quantity of the batch currently in stock, in the item's stocking unit. It counts all of the batch's stock, whatever its `batchStatus`, so quarantined, expired, and disposed stock are included. To take stock out, create and commit a document that moves it out, such as an inventory decrease."},"cost":{"type":"string","format":"decimal","description":"The cost of one unit of the batch. When more stock comes into the batch, the cost becomes the average of the existing and new stock, weighted by quantity."},"originalCost":{"type":"string","format":"decimal","description":"The cost of one unit of the batch when the stock was first received. Landed costs added later, such as freight or customs duty, raise it, and other revaluations can raise or lower it. When the batch is refilled after running out, it is reset to the new stock's cost."},"currency":{"type":"string","description":"The currency of `cost` and `originalCost`. Format: ISO 4217, for example 'USD'."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD."},"manufactureDate":{"type":"string","format":"date","description":"The date the manufacturer made the batch. Format: YYYY-MM-DD."},"bestBeforeDate":{"type":"string","format":"date","description":"The best-before date of the batch. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the batch's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase creates the batch, it is the date entered for the batch on that document, or the document's date when none was entered. When a warehouse transfer creates the batch, it is the `entryDate` of the batch in the sending warehouse. Each later receipt or inventory increase for the batch sets a new date. The age of all the batch's stock is then counted from the new date, including stock received earlier. A warehouse transfer that adds stock to an existing batch does not change the date."},"batchStatus":{"type":"string","description":"The status of the batch. Changing the status does not change the batch's `quantity`, `inStock`, or `cost`. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'."},"temperatureBreach":{"type":"boolean","description":"Whether the batch has been outside its storage temperature range."},"qcStatus":{"type":"string","description":"The quality-control status of the batch, as free text."},"active":{"type":"boolean","description":"Whether the batch is active."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the batch record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the batch record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The matching batches in this response. When more batches match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchNumber":"LOT-2026-0448","manufacturerBatchNumber":"MFG-8842-C","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","quantity":"400","inStock":"260","cost":"12.5","originalCost":"12","currency":"GBP","expirationDate":"2027-03-31","batchStatus":"ACTIVE","temperatureBreach":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchBatchNumbersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"batchNumber":{"type":"string","description":"Limits results to batches with this batch number. The match is exact."},"manufacturerBatchNumber":{"type":"string","description":"Limits results to batches with this manufacturer's batch number. The match is exact."},"itemId":{"type":"string","description":"Limits results to batches for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to batches in the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"batchStatus":{"type":"string","description":"Limits results to batches with this status. Accepted values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'."},"temperatureBreach":{"type":"boolean","description":"Limits results to batches with a temperature breach when true, and to batches without one when false."},"qcStatus":{"type":"string","description":"Limits results to batches with this quality-control status. The match is exact."},"active":{"type":"boolean","description":"Limits results to active batches when true, and to inactive batches when false."},"inStock":{"type":"boolean","description":"Limits results to batches with stock when true, and to batches with no stock when false."},"expiringBefore":{"type":"string","format":"date","description":"Limits results to batches expiring on or before this date. Format: YYYY-MM-DD."},"expiringAfter":{"type":"string","format":"date","description":"Limits results to batches expiring on or after this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to batches changed on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A batch must match every filter you send. Send an empty object to return all batches.","examples":[{"expiringBefore":"2027-12-31","inStock":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of batches per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size."}},"additionalProperties":false,"required":["filters"]},"createItemCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created item category.","examples":["a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"]}},"additionalProperties":false,"required":["id"]},"createItemCategoryInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not checked for uniqueness: creating a second category with an existing name succeeds.","examples":["Hardware"]},"description":{"type":"string","description":"A free-form description of what the category covers.","examples":["Fasteners, fittings and tooling"]},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. Defaults to true."},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency.","examples":["6.50"]},"parentId":{"type":"string","description":"The identifier of the category this one sits under. Omit for a top-level category. See id on GET inventory/item-categories/:id."}},"additionalProperties":false,"required":["name"]},"commitLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"documentStatus":{"type":"string","description":"The status of the landed cost after the commit. It is always 'COMMITTED'.","examples":["COMMITTED"]},"totalChargeAmount":{"type":"string","format":"decimal","description":"The total of the selected charges, in the landed cost's currency.","examples":["240"]},"revaluationIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the inventory revaluations that the commit created. Format: UUID. See `id` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation).","examples":[["f0a25c71-8d43-4e96-b2c8-51730e9a4d62"]]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings from the inventory revaluations that the commit created. An empty array when there are none. The landed cost is committed even when there are warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","revaluationIds","warnings"]},"commitLandedCostInput":{"type":"object","properties":{},"additionalProperties":false},"deleteSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted return, echoed back so a batch of deletes can be matched to requests.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]}},"additionalProperties":false,"required":["id"]},"updateReasonCodeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the reason code.","examples":["7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"]}},"additionalProperties":false,"required":["id"]},"updateReasonCodeInput":{"type":"object","properties":{"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. It must stay unique within the tenant. Reusing the reason code's own current code is not a collision."},"description":{"type":"string","description":"A free-form description of what the reason code means."},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. Set it to false to retire the reason code without deleting it: existing documents keep it and new ones cannot select it."},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect."},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The complete set of document types this reason code may be selected on. It replaces the current set. Anything not listed is unlinked, and an empty array unlinks everything. Omit to leave the links unchanged. An unrecognized value fails the call with UNKNOWN_DOCUMENT_TYPES, which names every value it did not recognize.","examples":[["InventoryDecrease","SalesReturn","Disposal"]]}},"additionalProperties":false},"getBatchTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch transaction. Format: UUID.","examples":["6d2b8e17-4f90-4c53-a821-0e7d3b95c46f"]},"batchNumberId":{"type":"string","description":"The unique identifier of the batch this transaction is for. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber).","examples":["9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9"]},"batchNumber":{"type":"string","description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse. Example: 'LOT-2026-08-14'.","examples":["LOT-2026-08-14"]},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. It shows the batch's current value, not the value at the time of the batch transaction. Format: YYYY-MM-DD.","examples":["2027-08-14"]},"transactionId":{"type":"string","description":"The unique identifier of the inventory transaction this batch transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction).","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The name of the item in `itemId`.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"unitId":{"type":"string","description":"The unique identifier of the unit of measure the batch transaction was recorded in. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure in `unitId`."},"transactionDate":{"type":"string","format":"date","description":"The date of the inventory transaction this batch transaction belongs to. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch that came into stock, in the item's stocking unit. It is 0 on an inventory revaluation, which changes the batch's cost without moving stock. Absent when stock went out.","examples":["500.00"]},"outQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch that went out of stock, in the item's stocking unit. Absent when stock came in or on an inventory revaluation."},"unitInQuantity":{"type":"string","format":"decimal","description":"The quantity that came into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit."},"unitOutQuantity":{"type":"string","format":"decimal","description":"The quantity that went out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"cost":{"type":"string","format":"decimal","description":"The unit cost of the batch, in the currency named by `currency`. When stock comes in, it is the unit cost of the stock received. When stock goes out, it is the batch's unit cost at that time. On an inventory revaluation, it is the batch's new unit cost.","examples":["3.75"]},"valueDelta":{"type":"string","format":"decimal","description":"The change in the total value of the batch's stock from this transaction, in the currency named by `currency`. A negative value is a decrease.","examples":["1875.00"]},"currency":{"type":"string","description":"The currency that `cost` and `valueDelta` are in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the batch transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the batch itself, such as its `expirationDate`, do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false,"required":["id","batchNumberId"]},"receiptsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created.","examples":["GR-2291"]},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods arrived or are expected. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The legal entity the receipt belongs to.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The vendor the goods came from.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that vendor.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor's own reference, typically their delivery note number."},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The carrier's tracking number for the inbound shipment. Returned, not filterable: matching it is a search criterion."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 4217 code the receipt is valued in.","examples":["EUR"]},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total value of the receipt, in the receipt's currency.","examples":["725.00"]},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines on the receipt.","examples":[2]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the receipt.","examples":["Received at the back dock"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]}},"additionalProperties":false},"createSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you.","examples":["SR-1042"]},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The name of that customer.","examples":["Bakker Retail B.V."]},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line.","examples":["55120"]},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'.","examples":["SalesDelivery"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number.","examples":["RMA-2026-0087"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back.","examples":["3SABCD1234567"]},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency.","examples":["144.00"]},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency.","examples":["0.00"]},"notes":{"type":"string","description":"Free text on the document.","examples":["Customer reports transit damage"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createSalesReturnInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Required, a return always comes from one. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it and the first line's warehouse decides it. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back. Use format YYYY-MM-DD.","examples":["2026-08-18"]},"currency":{"type":"string","description":"The currency for every amount on the return. Format ISO 4217, for example 'EUR'. Defaults to the legal entity's functional currency. Set it when the sale was in another.","examples":["EUR"]},"referenceNumber":{"type":"string","description":"The customer's own reference, for example an RMA number.","examples":["RMA-2026-0087"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back.","examples":["3SABCD1234567"]},"returnType":{"type":"string","description":"How the business classifies the return."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency."},"notes":{"type":"string","description":"Free text on the document.","examples":["Customer reports transit damage"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency. Omit it to take the price from the sale."},"condition":{"enum":["NEW","GOOD","USED","OPENED","DAMAGED","DEFECTIVE","EXPIRED","REFURBISHED"],"description":"The condition the goods are expected in. The inspection may find otherwise and restates it."},"disposition":{"enum":["RETURN_TO_STOCK","RETURN_TO_VENDOR","SCRAP","DONATE","REPAIR","REWORK","CREDIT_ONLY"],"description":"What you intend to do with the goods. The inspection may change it."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code. See id on GET inventory/reason-codes/:id."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return follows a delivery. It is a line's id on GET inventory/shipments/:id. Naming it lets the commit value the return from the original shipment cost."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch coming back, as batchNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line returns to. Given beside batchNumberId, it must be that batch's own number."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches coming back on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. On PATCH inventory/sales-returns/:id this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit coming back, as serialNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line returns to. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units coming back, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. On PATCH inventory/sales-returns/:id this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry may name a batchNumber or serialNumber of its own line. On PATCH inventory/sales-returns/:id this replaces the line's bin entries."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines of the return. At least one is required.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]]}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"bulkCreateLandedCostsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created landed cost. Format: UUID."},"documentNumber":{"type":"string","description":"The landed cost number, for example 'LC-1007'."}},"additionalProperties":false,"required":["id"]},"description":"The created landed costs, in the order you sent them.","examples":[[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateLandedCostsInput":{"type":"object","properties":{"landedCosts":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. It cannot be changed later. See `id` on GET base/entities (entities)."},"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD. Defaults to today's date in UTC. The inventory revaluations that the commit creates have this date, so it sets the date of the change in the stock's value. It must fall in an open accounting period."},"notes":{"type":"string","description":"Free text on the landed cost."},"receipts":{"type":"array","items":{"type":"object","properties":{"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"selectedLineIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the receipt lines to spread the charges over. Format: UUID. Each identifier must be the `id` of a line of the receipt named by `receiptId`. Omit to spread the charges over all of the receipt's lines. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."}},"additionalProperties":false,"required":["receiptId"]},"description":"The receipts whose stock the charges are spread over. Send at least one. Every receipt must have the `documentStatus` 'COMMITTED'."},"charges":{"type":"array","items":{"type":"object","properties":{"chargeId":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. The vendor bill is taken from the line, so you do not send it. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"allocationMode":{"type":"string","description":"How the charge is spread (allocated) over the receipt lines. Defaults to the `defaultAllocationMode` of the item on the vendor bill line, or to 'Equal' when there is no such default. To use the mode set on the matching landed cost item, send the `allocationMode` from GET inventory/landed-costs/vendor-bill-lines. 'Weight' needs a gross weight, weight, or net weight on the item of every selected receipt line. 'Volume' needs a volume per unit on the item of every selected receipt line, or else a length, width, and height on every one. Weights and volumes are converted to the same unit before the charge is spread. See `defaultAllocationMode`, `grossWeight`, `weight`, `netWeight`, `weightUnit`, `volumePerUnit`, `volumeUnit`, `length`, `width`, and `height` on GET inventory/items/:id (getItem). Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the vendor bill line to use, in the functional currency of the landed cost's legal entity. It must be more than 0. To use what is left on the line, send `functionalLineTotal` minus `functionalAllocatedAmount` from GET inventory/landed-costs/vendor-bill-lines. The commit fails if this amount is more than what is left on the line."},"isSelected":{"type":"boolean","description":"Whether to spread the charge over the receipt lines. Defaults to true. A charge set to false is kept in the landed cost's charges, so you can set it back to true later, but the commit does not spread it."}},"additionalProperties":false,"required":["chargeId","amount"]},"description":"The charges to spread over the stock. Each charge comes from a line of an approved vendor bill. Send at least one."}},"additionalProperties":false,"required":["entityId","receipts","charges"]},"description":"The landed costs to create.","examples":[[{"entityId":"7039b992-696a-40c7-a181-51759304ef83","receipts":[{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}],"charges":[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"Quantity","amount":"240"}]}]]}},"additionalProperties":false,"required":["landedCosts"]},"searchSerialNumbersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial number. Format: UUID."},"serialNumber":{"type":"string","description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity."},"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number."},"itemId":{"type":"string","description":"The unique identifier of the item this serial number belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse the unit is in, or was last in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the unit belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"inStock":{"type":"string","format":"decimal","description":"The current quantity of the unit in stock. It is 1 when the unit is in stock and 0 when it is not, including before the unit is received."},"isSold":{"type":"boolean","description":"Whether the unit has been sold."},"cost":{"type":"string","format":"decimal","description":"The cost of the unit. Cost changes made after the unit is sold are in `afterSaleCost`."},"originalCost":{"type":"string","format":"decimal","description":"The cost of the unit when it was first received. While the unit is in stock, landed costs added later, such as freight or customs duty, raise it, and other revaluations can raise or lower it. When the unit is received again on a receipt or inventory increase after it left stock, it is reset to the cost on that document. A sales return or a canceled shipment does not reset it."},"afterSaleCost":{"type":"string","format":"decimal","description":"The total of the cost changes made to the unit after it was sold, such as a landed cost added later. Absent when the unit has had no cost changes since it was sold."},"currency":{"type":"string","description":"The currency of `cost`, `originalCost`, and `afterSaleCost`. Format: ISO 4217, for example 'USD'."},"lastCostChangeDate":{"type":"string","format":"date","description":"The date the `cost` or `afterSaleCost` of the unit last changed. It is the date the change was committed, not the date of the document. Format: YYYY-MM-DD."},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase receives the unit, it is the date entered for the unit on that document, or the document's date when none was entered. Each later receipt or inventory increase for the unit sets a new date. A warehouse transfer does not change the date, including a transfer between legal entities."},"active":{"type":"boolean","description":"Whether the serial number is active."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the serial number record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the serial number record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The matching units in this response. When more units match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","manufacturerSerialNumber":"MFG-77-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"cost":"250","originalCost":"250","currency":"GBP","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchSerialNumbersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"serialNumber":{"type":"string","description":"Limits results to units with this serial number. The match is exact."},"manufacturerSerialNumber":{"type":"string","description":"Limits results to units with this manufacturer's serial number. The match is exact."},"itemId":{"type":"string","description":"Limits results to units for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to units in the warehouse with this unique identifier. Units that were shipped or removed from the warehouse are included. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"active":{"type":"boolean","description":"Limits results to active units when true, and to inactive units when false."},"inStock":{"type":"boolean","description":"Limits results to units in stock when true, and to units not in stock when false."},"isSold":{"type":"boolean","description":"Limits results to units that have been sold when true, and to units that have not been sold when false. A unit that was sold and then returned counts as not sold."},"expiringBefore":{"type":"string","format":"date","description":"Limits results to units expiring on or before this date. Format: YYYY-MM-DD."},"expiringAfter":{"type":"string","format":"date","description":"Limits results to units expiring on or after this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to units changed on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A unit must match every filter you send. Send an empty object to return all units.","examples":[{"itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","inStock":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of units per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size."}},"additionalProperties":false,"required":["filters"]},"getReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created.","examples":["GR-2291"]},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The legal entity the receipt belongs to.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The vendor the goods came from.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of that vendor.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number.","examples":["DN-77120"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency.","examples":["725.00"]},"notes":{"type":"string","description":"Free text on the receipt.","examples":["Received at the back dock"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned.","examples":["SD-8841"]},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD.","examples":["2026-08-19"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The display name of that customer.","examples":["Bakker Retail B.V."]},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"shipmentCarrierName":{"type":"string","description":"The name of that carrier.","examples":["PostNL"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods.","examples":["3SABCD7654321"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment.","examples":["PO-BAKKER-4417"]},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it.","examples":["OPEN"]},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency.","examples":["864.00"]},"notes":{"type":"string","description":"Free text on the shipment.","examples":["Palletised"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:05:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"36.00","inventoryQuantity":"36.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateShipmentInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The planned delivery date. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency for every amount on the shipment. Format ISO 4217, for example 'EUR'."},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id."},"trackingNumber":{"type":"string","description":"The carrier's tracking number.","examples":["3SABCD7654321"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment."},"notes":{"type":"string","description":"Free text on the shipment. Pass an empty string to clear it."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of lines to remove. Applied before updateLines and createLines."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line belonging to another shipment is rejected."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. It must agree with every other line. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to ship, in the line's unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"notes":{"type":"string","description":"Free text on the line. Pass an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch going out. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line ships from. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to ship, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches going out on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. This replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit going out. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line ships from. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units going out, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. This replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the goods from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line. This replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, each addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"36.00"}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line must use the same warehouse. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to ship, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency. Omit it to take the price from the sales order line."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id. Naming it links the shipment to the order it fulfills."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch going out. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line ships from. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to ship, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches going out on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit going out. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line ships from. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units going out, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the goods from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines to add."}},"additionalProperties":false},"createPurchaseRequestOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase request.","examples":["5f8a2c31-6b07-4d92-a4e8-1c93b0f7d254"]}},"additionalProperties":false,"required":["id"]},"createPurchaseRequestInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity that owns the request. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"currency":{"type":"string","description":"The currency of the request. Format ISO 4217, for example 'USD'. Governs every line amount.","examples":["EUR"]},"vendorId":{"type":"string","description":"The vendor the request is aimed at, when one is known. See id on GET accounting/vendors/:id."},"departmentId":{"type":"string","description":"The department the request is raised for. See id on GET people/departments/:id."},"description":{"type":"string","description":"A public-facing description of the request.","examples":["Replacement laptops"]},"internalDescription":{"type":"string","description":"An internal description, visible only to internal users."},"externalMemo":{"type":"string","description":"A memo carried onto vendor-facing documents."},"paymentTerms":{"type":"string","description":"The payment-terms key requested for the resulting order, for example 'net30'. These are tenant data, not a fixed list of values."},"externalId":{"type":"string","description":"The identifier this request has in the upstream system that produced it."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are required by. Use format YYYY-MM-DD.","examples":["2026-10-15"]},"startDate":{"type":"string","format":"date","description":"The date the request starts. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The date the request ends. Use format YYYY-MM-DD."},"lines":{"type":"array","items":{"type":"object","properties":{"isItem":{"type":"boolean","description":"True for an item line, priced by quantity times price. False for an expense line, priced by editableAmount."},"description":{"type":"string","description":"A description of what is being requested."},"itemId":{"type":"string","description":"The item being requested. See id on GET inventory/items/:id."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. See id on GET inventory/unit-of-measures/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"quantity":{"type":"string","format":"decimal","description":"The requested quantity, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the request currency, as a decimal."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, in the request currency, as a decimal."},"needByDate":{"type":"string","format":"date","description":"The date this line is needed by. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Use format YYYY-MM-DD."},"priority":{"type":"string","description":"The urgency of this line. Accepted values: 'high', 'medium', 'low'."}},"additionalProperties":false},"description":"The lines this request asks for. At least one is required.","examples":[[{"isItem":false,"description":"Laptop","editableAmount":"1800.00","priority":"high"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the request. Each names an already-uploaded file by its id."}},"additionalProperties":false,"required":["entityId","currency","lines"]},"inventoryDecreasesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned.","examples":["DEC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code of that warehouse location.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that warehouse location.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description of that reason code.","examples":["Count correction"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines the inventory decrease has. The collection returns it because the lines themselves are not on the collection.","examples":[1]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the inventory decrease.","examples":["August cycle count"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]}},"additionalProperties":false},"getBinOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]},"binCode":{"type":"string","description":"The short code that identifies the bin, for example 'A-01-1'. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created.","examples":["A-01-1"]},"barcode":{"type":"string","description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created.","examples":["BIN-A011"]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the bin is in. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id.","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-02"]},"locationName":{"type":"string","description":"The name of that warehouse.","examples":["Main warehouse"]},"aisle":{"type":"string","description":"The aisle in the warehouse layout.","examples":["A"]},"rack":{"type":"string","description":"The rack within the aisle.","examples":["01"]},"shelfLevel":{"type":"string","description":"The shelf level within the rack.","examples":["1"]},"zone":{"type":"string","description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'.","examples":["Picking"]},"itemPosition":{"type":"string","description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments.","examples":[true]},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away.","examples":[false]},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"type":"number","description":"The largest number of units the bin will hold. It is meaningful only when everything in the bin is counted in the same unit.","examples":[500]},"maxWeight":{"type":"string","format":"decimal","description":"The largest weight the bin will hold, in maxWeightUnit.","examples":["250"]},"maxWeightUnit":{"type":"string","description":"The unit maxWeight is given in. Possible values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"maxVolume":{"type":"string","format":"decimal","description":"The largest volume the bin will hold, in maxVolumeUnit."},"maxVolumeUnit":{"type":"string","description":"The unit maxVolume is given in. Possible values: 'L'."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Possible values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it.","examples":["HardBlock"]},"tempZone":{"type":"string","description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'.","examples":["Ambient"]},"tempMin":{"type":"string","format":"decimal","description":"The lowest temperature kept in the bin, in degrees Celsius."},"tempMax":{"type":"string","format":"decimal","description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin.","examples":[false]},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. When false, the stock already in the bin stays there but no new movement can be assigned to it.","examples":[true]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the bin was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bin record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"capacity":{"type":"object","properties":{"currentQuantity":{"type":"string","format":"decimal","description":"The number of units in the bin."},"currentWeight":{"type":"string","format":"decimal","description":"The total weight of what is in the bin, normalized to kilograms whatever unit the limit is given in."},"currentVolume":{"type":"string","format":"decimal","description":"The total volume of what is in the bin, normalized to cubic meters."},"quantityUtilizationPct":{"type":"string","format":"decimal","description":"How full the bin is against maxQuantity, as a percentage."},"weightUtilizationPct":{"type":"string","format":"decimal","description":"How full the bin is against maxWeight, as a percentage."},"volumeUtilizationPct":{"type":"string","format":"decimal","description":"How full the bin is against maxVolume, as a percentage."},"status":{"type":"string","description":"How full the bin is overall. Possible values: 'ok', 'near_full', 'exceeded'. 'exceeded' means the bin is over a limit it was given, which is possible because a 'SoftWarning' bin allows the movement that crosses the limit."},"mixedUnits":{"type":"boolean","description":"Whether the bin holds items counted in more than one stocking unit. When true, currentQuantity is a sum of unlike things and the quantity utilization means nothing, so use the weight and volume instead."}},"additionalProperties":false,"description":"What is in the bin now, measured against what it will hold. Present on this endpoint only. Absent when the bin has no limit configured, because there is nothing to measure a utilization against.","examples":[{"currentQuantity":"310","currentWeight":"148.2","quantityUtilizationPct":"62","weightUtilizationPct":"59.3","status":"ok","mixedUnits":false}]}},"additionalProperties":false,"required":["id"]},"employeeAdvancesRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the advance request — the public identifier used by GET accounting/employee-advances/:id. Filter e.g. filter[id][in]=<id1>,<id2>."},"advanceRequestNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated document number (ADV-...). Filter target: filter[advanceRequestNumber][eq]=ADV-1042."},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the requesting employee. Filter e.g. filter[employeeId][eq]=<uuid>."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the entity the request belongs to."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the AdvancePaymentCategory this request draws from."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Requested amount, in currency. Orderable, e.g. sort=-amount."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 4217 three-letter currency code that governs amount. Filter target: filter[currency][in]=USD,EUR."},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the advance is for."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Lifecycle status: draft, pendingApproval, approved, rejected or issued. Filter target: filter[status][eq]=pendingApproval."},"requestDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the request was submitted, as YYYY-MM-DD. Filter target: filter[requestDate][gte]=2026-01-01."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Instant the request last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). filter[lastModifiedDate][gte]=… plus sort=lastModifiedDate is a complete incremental-sync cursor."}},"additionalProperties":false},"createItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"type":"string","description":"The item code of the created item.","examples":["WIDGET-01"]}},"additionalProperties":false,"required":["id"]},"createItemInput":{"type":"object","properties":{"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Must be unique within the tenant, including against retired items whose codes are never released. It cannot be changed after the item is created.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The display name of the item.","examples":["Standard widget"]},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It cannot be changed after the item is created. See id on GET inventory/item-types/:id.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id.","examples":["6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b"]},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction will be in this unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id.","examples":["77bd4c16-e1f0-426d-a98f-07b063df2d9c"]},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. inventoryUnitId, salesUnitId and purchaseUnitId must all be units in this group, and a unit outside it fails with UNIT_NOT_IN_UNIT_GROUP. See id on GET inventory/unit-of-measure-groups/:id.","examples":["38b5454a-c3fe-452b-9754-61f9ead49e87"]},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Accepted values: 'movingAverage', 'batch', 'serials', 'none'. Use 'none' for an item that is not stocked. Defaults to 'movingAverage'. 'batch' requires isBatch, 'serials' requires isSerial, and 'none' requires isInventory false, and each contradiction fails with TRACKING_MISMATCH. 'fifo' is under development and fails with VALUATION_METHOD_UNAVAILABLE.","examples":["movingAverage"]},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Defaults to false."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Defaults to false."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. Defaults to true. Set false for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents. Defaults to true."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents. Defaults to true."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. Defaults to true. Setting it false retires the item without deleting it."},"notes":{"type":"string","description":"Free text on the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Omit for no restriction. Omitting it is not the same as sending 1."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning. State its currency in currency."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price. State its currency in currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Required when either is given. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. Set it if the item may be received under a landed cost that uses Weight allocation, because that mode fails rather than falling back when an item has no weight.","examples":["1.4"]},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Accepted values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Accepted values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge billed as this item falls back to when it names none. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest storage temperature, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest storage temperature, in degrees Celsius."}},"additionalProperties":false,"required":["itemCode","itemTypeId","categoryId","inventoryUnitId","unitGroupId"]},"getVendorCreditOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor credit."},"vendorCreditNumber":{"type":"string","description":"The vendor credit number. Absent until a number has been assigned."},"referenceNumber":{"type":"string","description":"The vendor's credit memo reference number, as printed on the vendor's document."},"creditDate":{"type":"string","format":"date","description":"The date on the vendor's credit memo. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the credit is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"status":{"type":"string","description":"The application status, how much of the credit has been set against vendor bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalAmount":{"type":"string","format":"decimal","description":"The total credit amount, in currency."},"externalId":{"type":"string","description":"The identifier this credit has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this credit is from. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this credit is from."},"entityId":{"type":"string","description":"The legal entity this credit is booked under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this credit is booked under."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor credit last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line item number."},"description":{"type":"string","description":"A description of the credit line item."},"lineType":{"type":"string","description":"The type of line item. Possible values: 'expense', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The line credit amount, in the credit currency."},"currency":{"type":"string","description":"The currency for the line. It always matches the credit currency. Format ISO 4217, for example 'USD'."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the credit currency."},"vatAmount":{"type":"string","format":"decimal","description":"The computed VAT amount on the line, in the credit currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 19 means 19%, not 0.19."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted credit reads 'notStarted' until the credit posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in the credit currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The credit line items, in their order on the credit. An empty array when the credit has none."}},"additionalProperties":false,"required":["id","referenceNumber","creditDate","currency","lastModifiedDate"]},"bulkCreateItemCategoriesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created item category."}},"additionalProperties":false,"required":["id"]},"description":"The created item categories, in input order. Match rows to inputs by index.","examples":[[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"},{"id":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateItemCategoriesInput":{"type":"object","properties":{"itemCategories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not checked for uniqueness, within this batch or against existing records."},"description":{"type":"string","description":"A free-form description of what the category covers."},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. Defaults to true."},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency."},"parentId":{"type":"string","description":"The identifier of an existing category this one sits under. Omit for a top-level category. See id on GET inventory/item-categories/:id."}},"additionalProperties":false,"required":["name"]},"description":"The item categories to create. All or nothing: if any row fails, nothing is created.","examples":[[{"name":"Hardware","description":"Fasteners, fittings and tooling","idealTurnoverRatio":"6.50"},{"name":"Consumables","idealTurnoverRatio":"12.00"}]]}},"additionalProperties":false,"required":["itemCategories"]},"warehouseTransfersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transfer's number, for example 'WTR-2291'.","examples":["WTR-2291"]},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the transfer is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your own reference on the transfer."},"transferType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed.","examples":["NORMAL"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity the goods leave. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"toEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Central warehouse"]},"targetLocationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"targetLocationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Northern depot"]},"billingStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"sourceAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the document."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines on the transfer.","examples":[1]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.104Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"searchExpenseReportOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense report."},"expenseNumber":{"type":"string","description":"The expense number. Absent until one has been assigned."},"status":{"type":"string","description":"The approval status of the report. Values include 'draft', 'pendingApproval', 'approved', 'rejected' and 'paid'."},"paymentStatus":{"type":"string","description":"The payment status of the report. Absent until a payment run has touched it."},"submittedDate":{"type":"string","format":"date","description":"The date the employee submitted the report for approval. Format YYYY-MM-DD."},"reimbursementCurrency":{"type":"string","description":"The currency the report is reimbursed in. Format ISO 4217, for example 'USD'. Governs every header total below."},"reimbursableTotal":{"type":"string","format":"decimal","description":"The total reimbursable amount across the report's items, in reimbursementCurrency."},"reimbursableTotalNetAmount":{"type":"string","format":"decimal","description":"The total reimbursable amount excluding VAT, in reimbursementCurrency."},"amountPaid":{"type":"string","format":"decimal","description":"The amount already reimbursed to the employee, in reimbursementCurrency."},"openAmount":{"type":"string","format":"decimal","description":"The amount still owed to the employee, reimbursableTotal minus amountPaid, in reimbursementCurrency."},"pendingAmount":{"type":"string","format":"decimal","description":"The amount committed to an in-flight payment run but not yet paid, in reimbursementCurrency."},"containsBillableItem":{"type":"boolean","description":"Whether at least one item on the report is marked billable to a customer."},"markAsPaid":{"type":"boolean","description":"Whether the report was flagged as paid without going through a payment run."},"pendingPayment":{"type":"boolean","description":"Whether a payment for this report is in flight."},"skipJournalEntry":{"type":"boolean","description":"Whether the report is configured not to post a journal entry."},"reviewMessage":{"type":"string","description":"The reviewer's note left on approval or rejection."},"externalUrl":{"type":"string","description":"A link to the report in the upstream system that produced it."},"externalExpenseReportId":{"type":"string","description":"The identifier this report has in the upstream system that produced it. It is not unique."},"origin":{"type":"string","description":"The source system this report came from, as free-form text."},"employeeId":{"type":"string","description":"The employee the report belongs to. See id on GET people/person/:id."},"employeeName":{"type":"string","description":"The name of the employee the report belongs to."},"entityId":{"type":"string","description":"The legal entity the report is posted under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the report is posted under."},"departmentId":{"type":"string","description":"The department the report is charged to. See id on GET people/departments/:id."},"offsetAccountId":{"type":"string","description":"The GL offset account for the reimbursement. See id on GET accounting/accounts/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the expense report last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"expenseItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense item."},"itemNumber":{"type":"string","description":"The expense item number."},"merchant":{"type":"string","description":"The merchant the expense was incurred with."},"billDate":{"type":"string","format":"date","description":"The date the expense was incurred. Format YYYY-MM-DD."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense item."},"amount":{"type":"string","format":"decimal","description":"The amount of the expense item, as a decimal in the item's own currency."},"currency":{"type":"string","description":"The currency this item's amount is in. Format ISO 4217, for example 'USD'. May differ from the report's reimbursementCurrency."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursable to the employee."},"categoryId":{"type":"string","description":"The expense category the item is booked to. See id on GET accounting/expense-categories/:id."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the attachment record."},"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the stored file. There is no endpoint for it."}},"additionalProperties":false,"required":["id"]},"description":"The receipts on this item."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted report reads 'notStarted' until the report posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in this item's currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this item is deferred over, one per accounting book. Absent when the item is not amortized. An expense item has no line type, so what makes it amortizable is its account: the category or account it books to must be a prepaid-expenses account. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The expense items on the report, in their order on it. An empty array when the report has none."}},"additionalProperties":false,"required":["id","status","reimbursementCurrency","lastModifiedDate"]},"description":"The expense reports that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more reports remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchExpenseReportInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the expense report with this identifier."},"expenseNumber":{"type":"string","description":"Limits results to reports with this expense number. It is not unique, so this can match several reports."},"employeeId":{"type":"string","description":"Limits results to reports belonging to this employee, given as the employee id. See id on GET people/person/:id. An id that matches no employee yields an empty page, not an error."},"entityId":{"type":"string","description":"Limits results to reports posted under this legal entity, given as the entity id. See id on GET base/entities. An id that matches no entity yields an empty page, not an error."},"employeeName":{"type":"string","description":"Limits results to reports whose employee has this name. The match is exact and case-sensitive."},"entityName":{"type":"string","description":"Limits results to reports whose legal entity has this name. The match is exact and case-sensitive."},"status":{"type":"string","description":"Limits results to reports in this approval status. Values include 'draft', 'pendingApproval', 'approved', 'rejected' and 'paid'. Any other value matches no report."},"paymentStatus":{"type":"string","description":"Limits results to reports in this payment status. Any other value matches no report."},"externalExpenseReportId":{"type":"string","description":"Limits results to reports with this upstream identifier. It is not unique, so this can match several reports."}},"additionalProperties":false,"description":"The filters to apply. An expense report must match every filter you send. Omit to return all expense reports.","examples":[{"status":"pendingApproval"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of expense reports per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"updateSerialNumberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial number. Format: UUID.","examples":["c3f80a41-6d29-4b57-8e10-92a4d7b05f63"]}},"additionalProperties":false,"required":["id"]},"updateSerialNumberInput":{"type":"object","properties":{"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number.","examples":["MFG-77-000418"]},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. If a receipt or inventory increase for the unit comes after your update, it sets a new date and replaces the date you sent."},"active":{"type":"boolean","description":"Whether the serial number is active."}},"additionalProperties":false},"cancelExpenseReportSubmissionOutput":{"type":"object","properties":{},"additionalProperties":false},"cancelExpenseReportSubmissionInput":{"type":"object","properties":{},"additionalProperties":false},"updateUnitOfMeasureOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"updateUnitOfMeasureInput":{"type":"object","properties":{"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. It must stay unique within the tenant. Reusing the unit of measure's own current code is not a collision."},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'.","examples":["Kilograms"]}},"additionalProperties":false},"getPurchaseOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase order."},"poNumber":{"type":"string","description":"The purchase order number, for example 'PO-3'. Absent while none has been assigned."},"description":{"type":"string","description":"The description of the order, shown to the vendor."},"internalDescription":{"type":"string","description":"Internal notes on the order, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo intended for the vendor."},"externalPONumber":{"type":"string","description":"The order reference in the vendor's or an upstream system. It is not unique."},"approvalStatus":{"type":"string","description":"The approval status of the order. Possible values: 'approved', 'pendingApproval', 'rejected'."},"budgetStatus":{"type":"string","description":"The budget-check status of the order. Possible values: 'approved', 'rejected', 'pendingApproval'. Independent of approvalStatus."},"status":{"type":"string","description":"The order lifecycle status. Possible values: 'open', 'inprogress', 'closed', 'overMatched'. This is not the vendor-bill matching status, which is per line in each line's matchStatus."},"currency":{"type":"string","description":"The currency the order is denominated in. Format ISO 4217, for example 'USD'. Governs every amount on the order and its lines."},"totalAmount":{"type":"string","format":"decimal","description":"The total ordered amount, the sum of the line totals, in the order currency."},"invoicedTotalAmount":{"type":"string","format":"decimal","description":"The portion of the order already invoiced by vendor bills, in the order currency."},"receivedTotalAmount":{"type":"string","format":"decimal","description":"The portion of the order already received as goods, in the order currency."},"startDate":{"type":"string","format":"date","description":"The first day of the period the order covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the order covers. Format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment-terms code applied to this order, for example 'net30', 'net60', 'dueOnReceipt' or 'custom'. Inherited from the vendor unless overridden."},"hasInventoryItems":{"type":"boolean","description":"Whether any line references an inventory item."},"vendorId":{"type":"string","description":"The vendor this order is placed with. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this order is placed with."},"vendorContactEmail":{"type":"string","description":"The main contact email at the vendor."},"entityId":{"type":"string","description":"The legal entity this order is placed by. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this order is placed by."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"approvals":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","description":"What was decided. Values include 'approve' and 'reject'."},"employeeName":{"type":"string","description":"The name of the employee who decided."},"message":{"type":"string","description":"The reviewer's note, where one was given."},"decidedAt":{"type":"string","format":"date-time","description":"The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["decision","decidedAt"]},"description":"The approval decisions on this order, oldest first. An empty array when no approval policy has matched the order."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line number, for example 'POL-3'."},"description":{"type":"string","description":"A description of the line item."},"isItem":{"type":"boolean","description":"Whether the line is an item line. True when the line references an item, false when it is an expense line."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency. Set on item lines. On an expense line the amount is in editableAmount instead."},"editableAmount":{"type":"string","format":"decimal","description":"The directly entered line amount, in the order currency. Used on expense lines, where there is no unit price to multiply."},"total":{"type":"string","format":"decimal","description":"The line total, in the order currency: price times quantity on an item line, editableAmount on an expense line."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount applied to the line, as a percentage. 10 means 10%, not 0.10."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. It always matches the order currency."},"status":{"type":"string","description":"The delivery status of the line. Possible values: 'undelivered', 'delivering', 'delivered'."},"matchStatus":{"type":"string","description":"The vendor-bill matching status of the line. Possible values: 'unmatched', 'partiallyMatched', 'matched', 'overMatched'."},"invoicedStatus":{"type":"string","description":"The invoicing status of the line. Possible values: 'uninvoiced', 'partiallyInvoiced', 'invoiced', 'overInvoiced'."},"receivedStatus":{"type":"string","description":"The goods-receipt status of the line. Possible values: 'unreceived', 'partiallyReceived', 'received', 'overReceived'."},"invoicedQuantity":{"type":"string","format":"decimal","description":"The quantity invoiced against this line so far, as a decimal."},"invoicedAmount":{"type":"string","format":"decimal","description":"The amount invoiced against this line so far, in the order currency."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity received against this line so far, as a decimal."},"receivedAmount":{"type":"string","format":"decimal","description":"The amount received against this line so far, in the order currency."},"remainingAmount":{"type":"string","format":"decimal","description":"The amount still open on this line, in the order currency: the line total less what has been invoiced."},"startDate":{"type":"string","format":"date","description":"The first day of the period this line covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period this line covers. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date this line was delivered. Format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Format YYYY-MM-DD."},"unitOfMeasure":{"type":"string","description":"The name of the unit of measure for the quantity."},"unitOfMeasureId":{"type":"string","description":"The unit of measure for the quantity."},"itemId":{"type":"string","description":"The item this line orders. Present on item lines."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."}},"additionalProperties":false,"required":["id"]},"description":"The order line items, in their order on the order. An empty array when the order has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"createPurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The purchase return number.","examples":["PRTR-1043"]},"documentStatus":{"type":"string","description":"The status of the purchase return. It is always 'DRAFT' on a created purchase return.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD.","examples":["2026-08-20"]},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"The unique identifier of the receipt the purchase return was created against. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped, and on lines whose `sourceDocumentLineType` is not 'PurchaseOrderLine'."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the receipt line or purchase order line that this line returns goods from. Format: UUID. `sourceDocumentLineType` says whether it is a receipt line or a purchase order line. See `lines[].id` on GET inventory/receipts/:id (getReceipt) or GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'InvPurchaseDeliveryLine' (a receipt line), 'PurchaseOrderLine' (a purchase order line)."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","quantity":"30.00","unitPrice":"3.20"}]]},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from, for purchase return lines that return goods from a purchase order line. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped, and when no purchase return line returns goods from a purchase order line."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createPurchaseReturnInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD. Defaults to today's date in UTC. It cannot be in the future.","examples":["2026-08-20"]},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217, for example 'EUR'. If this currency differs from the legal entity's functional currency, an exchange rate between the two currencies must exist for the `documentDate`."},"returnType":{"type":"string","description":"The type of the purchase return. Defaults to 'NORMAL'. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Shipping an 'UNINVOICED_CANCELLATION' purchase return fails when a line returns more of its purchase order line than is received, not invoiced, and not already canceled. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]},"originalReceiptId":{"type":"string","description":"The unique identifier of the receipt the purchase return is created against. Format: UUID. The receipt must belong to the purchase return's legal entity. Setting it does not fill in the lines. Each line still names the receipt line or purchase order line it returns goods from, in `sourceDocumentLineId`. See `id` on GET inventory/receipts/:id (getReceipt)."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return.","examples":["RMA-4471"]},"notes":{"type":"string","description":"Notes on the purchase return.","examples":["Damaged in transit"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It must belong to the purchase return's legal entity. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. Required. When the line returns goods from a receipt line ('InvPurchaseDeliveryLine'), it must be the same unit as on the receipt line. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It must be greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It can be zero, but not less than zero."},"sourceDocumentLineId":{"type":"string","description":"The identifier of the receipt line or purchase order line that this line returns goods from. Send the line's unique identifier or its numeric `id`. Set `sourceDocumentLineType` to say which kind of line it is. See `lines[].id` on GET inventory/receipts/:id (getReceipt) or GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Defaults to 'InvPurchaseDeliveryLine'. Accepted values: 'InvPurchaseDeliveryLine' (a receipt line), 'PurchaseOrderLine' (a purchase order line)."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned. To identify the batch, send `batchNumberId`. To take this batch from a bin, send the same value in `binLocations[].batchNumber`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch to return, in the item's stocking unit. It must be greater than zero."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being returned. Required when the item is batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned. To identify the unit, send `serialNumberId`. To take this unit from a bin, send the same value in `binLocations[].serialNumber`."}},"additionalProperties":false},"description":"The serialized units being returned, one entry for each unit. Required when the item is serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for. It must match the `batchNumber` of one of the line's batches."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for. It must match the `serialNumber` of one of the line's serials."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins to take the stock on this purchase return line from, with the quantity to take from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["itemId","locationId","quantity"]},"description":"The lines of the purchase return. Send at least one.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"30.00","unitPrice":"3.20","sourceDocumentLineId":"6b02f4d8-91c3-4e57-a8f6-3c1d9e70b254","sourceDocumentLineType":"InvPurchaseDeliveryLine","notes":"Cracked casings"}]]}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"createPayrollDetailOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payroll run.","examples":["4d8f2b61-7a09-4c35-8e12-9b3d5f0a6c47"]}},"additionalProperties":false,"required":["id"]},"createPayrollDetailInput":{"type":"object","properties":{"templateId":{"type":"string","description":"The payroll template this run uses. See id on GET accounting/payroll-templates/:id. It supplies the categories, the journal-entry-date rule, the group-by and the clearing account.","examples":["b7e4c1a9-3f52-4d86-9017-5a2c8e0b4d61"]},"entityId":{"type":"string","description":"The legal entity that owns the payroll. See id on GET base/entities.","examples":["7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"]},"grouping":{"type":"string","description":"How the payroll is grouped. Values include 'Employee', 'Department' and 'Multi-level'.","examples":["Employee"]},"status":{"type":"string","description":"The status of the payroll. Defaults to 'pendingApproval' when omitted."},"payrollDate":{"type":"string","format":"date","description":"The issue date of the payroll. Use format YYYY-MM-DD.","examples":["2026-08-31"]},"startDate":{"type":"string","format":"date","description":"The first day of the payroll period. Use format YYYY-MM-DD.","examples":["2026-08-01"]},"endDate":{"type":"string","format":"date","description":"The last day of the payroll period, which must not be before the start date. Use format YYYY-MM-DD.","examples":["2026-08-31"]},"currency":{"type":"string","description":"The currency the payroll is denominated in. Format ISO 4217, for example 'USD'.","examples":["USD"]},"description":{"type":"string","description":"A description of the payroll.","examples":["August 2026 payroll"]},"isNetPayCategoryMapped":{"type":"boolean","description":"Whether the net-pay category is matched in the account mapping. Defaults to false."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"lines":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee this line is for. There is no endpoint for it. With grouping 'Employee', a line that names an employee but no department has the department backfilled from that employee's primary job."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"lineItems":{"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","description":"The payroll category this amount belongs to. There is no endpoint for it. It must be an active category of the payroll's template."},"amount":{"type":"string","format":"decimal","description":"The amount for this category, as a decimal in the payroll's currency."}},"additionalProperties":false,"required":["categoryId","amount"]},"description":"The amounts on this line, one per payroll category. Each category must be reachable from the payroll's template. An item whose amount is null is dropped before the payroll is saved."}},"additionalProperties":false,"required":["lineItems"]},"description":"The payroll's lines, one per employee or department depending on the grouping.","examples":[[{"employeeId":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84","lineItems":[{"categoryId":"9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95","amount":"5000.00"},{"categoryId":"e5c7a390-1d64-4b28-9a07-2f8b6d4c1e53","amount":"5000.00"}]}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the uploaded file in file storage, as a text reference. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the payroll. Omit for none, unless your tenant requires an attachment, in which case omitting them fails with ATTACHMENT_REQUIRED."}},"additionalProperties":false,"required":["templateId","entityId","grouping","payrollDate","currency","lines"]},"bulkDeleteLandedCostsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted landed cost. Format: UUID."}},"additionalProperties":false,"required":["id"]},"description":"The deleted landed costs, in the order you sent them."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteLandedCostsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the landed costs to delete. Format: UUID.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"getOutboundPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the outbound payment."},"outboundPaymentNumber":{"type":"string","description":"The outbound payment number. Absent until a number has been assigned."},"description":{"type":"string","description":"A description of the payment."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is denominated in. Format ISO 4217, for example 'USD'. Governs totalPaid, appliedAmount and unappliedAmount."},"paymentType":{"type":"string","description":"How the money was sent, for example 'ach', 'wire' or 'check'."},"status":{"type":"string","description":"The processing status of the payment."},"approvalStatus":{"type":"string","description":"Where the payment sits in the approval workflow."},"applicationStatus":{"type":"string","description":"How much of the payment has been applied to bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid, in the payment currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The portion already applied against vendor bills, in the payment currency."},"unappliedAmount":{"type":"string","format":"decimal","description":"The portion not yet applied to any bill, in the payment currency."},"bankCurrency":{"type":"string","description":"The currency of the bank account the money left, when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"paymentId":{"type":"string","description":"The payment reference assigned by the bank or payment provider."},"externalId":{"type":"string","description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"externalUrl":{"type":"string","description":"A link to the payment in an external system, when one is stored."},"origin":{"type":"string","description":"The source system this payment came from. Recorded when an integration created the payment."},"singlePayment":{"type":"boolean","description":"Whether the payment covers a single bill rather than a batch."},"paymentAccountId":{"type":"string","description":"The bank general ledger account the money left. See id on GET accounting/accounts/:id."},"paymentAccountName":{"type":"string","description":"The name of the bank general ledger account the money left."},"entityId":{"type":"string","description":"The legal entity that made the payment. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A description of the line."},"amount":{"type":"string","format":"decimal","description":"The amount paid on this line, in the line currency."},"currency":{"type":"string","description":"The currency for the line. Format ISO 4217, for example 'USD'."},"paymentDate":{"type":"string","format":"date","description":"The date this line was paid, when it differs from the header. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"How this line was sent, for example 'ach', 'wire' or 'check'."},"receiverName":{"type":"string","description":"The name of the payee."},"receiverAccount":{"type":"string","description":"The payee bank account number. It is returned here and on search but never on the collection endpoint and never filterable."},"receiverBankCode":{"type":"string","description":"The payee sort or routing code. It is returned here and on search but never on the collection endpoint and never filterable."},"customReference":{"type":"string","description":"A reference you supplied, carried on the line."}},"additionalProperties":false,"required":["id","description","currency","receiverName"]},"description":"The payment lines, one per payee or bill covered. An empty array when the payment has none."}},"additionalProperties":false,"required":["id","paymentDate","paymentCurrency","paymentType","status","lastModifiedDate"]},"deleteItemAttributeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the removed item attribute.","examples":["9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"]}},"additionalProperties":false,"required":["id"]},"updateOutboundPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateOutboundPaymentInput":{"type":"object","properties":{"accountId":{"type":"string","description":"The bank or cash account the payment is made from. See id on GET accounting/accounts/:id."},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Use format YYYY-MM-DD.","examples":["2026-08-28"]},"paymentCurrency":{"type":"string","description":"The currency of the payment. Format ISO 4217, for example 'USD'. Governs each item's amount unless the item names its own currency."},"commonDescription":{"type":"string","description":"A description applied to the payment as a whole.","examples":["August vendor run (revised)"]},"externalUrl":{"type":"string","description":"A link back to the payment in the upstream system."},"origin":{"type":"string","description":"The source system this payment came from."},"senderAccountId":{"type":"string","description":"A bank account identifier for the sender, supplied by an integration. It is free-form text, not a reference to an account record."},"actualExchangeRate":{"type":"string","format":"decimal","description":"The exchange rate the bank actually applied, as a decimal."},"systemExchangeRate":{"type":"string","format":"decimal","description":"The exchange rate the system derived, as a decimal."},"skipJournalEntry":{"type":"boolean","description":"Whether to skip journal-entry creation for this payment."},"createPaymentItems":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","description":"The document being paid, of the kind this payment already pays. See id on GET accounting/vendor-bills/:id or GET accounting/expense-reports/:id."},"entityId":{"type":"string","description":"The legal entity the document is posted under. See id on GET base/entities."},"amount":{"type":"string","format":"decimal","description":"The amount applied to this document, as a decimal."},"currency":{"type":"string","description":"The currency for this item. Format ISO 4217, for example 'USD'. Omit to use the payment's currency."},"description":{"type":"string","description":"What this item pays for. Required."}},"additionalProperties":false,"required":["documentId","entityId","amount","description"]},"description":"Documents to add to this payment. Each has the same shape as on create, without an id."},"updatePaymentItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment item to change. It must belong to this payment."},"documentId":{"type":"string","description":"The document being paid. See id on GET accounting/vendor-bills/:id or GET accounting/expense-reports/:id."},"entityId":{"type":"string","description":"The legal entity the document is posted under. See id on GET base/entities."},"amount":{"type":"string","format":"decimal","description":"The amount applied to this document, as a decimal."},"currency":{"type":"string","description":"The currency for this item. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"What this item pays for."}},"additionalProperties":false,"required":["id"]},"description":"Payment items to change, each addressed by the id the payment publishes."},"deletePaymentItems":{"type":"array","items":{"type":"string"},"description":"The identifiers of payment items to remove, applied before the updates and creates. Each must belong to this payment. Removing them all is refused, so delete the payment instead."}},"additionalProperties":false},"deleteAdvancePaymentCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"createVendorBillOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created vendor bill.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createVendorBillInput":{"type":"object","properties":{"vendorId":{"type":"string","description":"The vendor the bill is from. See id on GET accounting/vendors/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"entityId":{"type":"string","description":"The legal entity the bill is posted under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"billNumber":{"type":"string","description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors.","examples":["INV-88213"]},"billDate":{"type":"string","format":"date","description":"The date printed on the vendor's invoice. Use format YYYY-MM-DD.","examples":["2026-08-01"]},"dueDate":{"type":"string","format":"date","description":"The date payment is due. Use format YYYY-MM-DD.","examples":["2026-08-31"]},"currency":{"type":"string","description":"The currency of the bill. Format ISO 4217, for example 'USD'. Governs every line amount and vatAmount, which are decimals.","examples":["EUR"]},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD. Omit to leave it unset. For an entity whose country requires a service date it then defaults to billDate."},"paymentTerms":{"type":"string","description":"The payment-terms key, for example 'net30', 'net60' or 'dueOnReceipt'. The API does not check it against a list. Omit to inherit 'custom'."},"externalVendorBillId":{"type":"string","description":"The identifier this bill has in the upstream system that produced it. It is not unique."},"markAsPaid":{"type":"boolean","description":"Whether to mark the bill paid on creation. Defaults to false."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"lines":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, including VAT where applicable, as a decimal in the bill currency."},"description":{"type":"string","description":"A description of the line item, typically copied from the vendor's invoice."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is charged to. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The line's cost moves to that entity through an intercompany cross charge journal entry. It must differ from entityId, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"customerId":{"type":"string","description":"The customer this expense is rebilled to. See id on GET accounting/customers/:id. It is only meaningful alongside billableExpense."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 19 means 19%, not 0.19."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the bill currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it."},"purchaseOrderLineId":{"type":"string","description":"The purchase-order line this line is matched against. There is no endpoint for it."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'."},"lineType":{"type":"string","description":"The kind of line. Values include 'expense' (a one-time cost) and 'prepaidExpense' (an upfront cost spread over several periods). Defaults to 'expense'."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency. It is required here, because a schedule without one cannot be turned into installments when the bill posts."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. Only a line whose lineType is 'prepaidExpense' may carry them. Each schedule starts out not started and begins recognizing once the bill is approved and posts."}},"additionalProperties":false,"required":["amount"]},"description":"The line items of the bill, in the order they should appear. At least one is expected. A bill with no lines asks for no expense.","examples":[[{"amount":"1200.00","description":"Consulting, August","vatPercentage":"19.00"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the bill. Each names an already-uploaded file by its id."}},"additionalProperties":false,"required":["vendorId","entityId","billNumber","billDate","dueDate","currency","lines"]},"getInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned.","examples":["INC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory increase.","examples":["August cycle count"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth, and unitPrice is calculated from it as lineValue divided by quantity. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"approvePurchaseOrderOutput":{"type":"object","properties":{"status":{"type":"string","description":"The approval status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"approvePurchaseOrderInput":{"type":"object","properties":{},"additionalProperties":false},"updateItemCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the updated item category.","examples":["a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"]}},"additionalProperties":false,"required":["id"]},"updateItemCategoryInput":{"type":"object","properties":{"name":{"type":"string","description":"The new display name of the category, for example 'Hardware'. Cannot be cleared, and is not checked for uniqueness: renaming onto a name another category already has is allowed."},"description":{"type":"string","description":"A new free-form description of what the category covers."},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. Set false to retire the category without deleting it: existing items keep their assignment and new ones cannot choose it."},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"A new target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency.","examples":["8.00"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the category this one sits under. This is how a category is re-parented. Pass null to make it a top-level category. Re-parenting moves the whole subtree and touches no item: items stay assigned to the categories they already had. See id on GET inventory/item-categories/:id."}},"additionalProperties":false},"deleteVendorOutput":{"type":"object","properties":{},"additionalProperties":false},"updateInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'.","examples":["REV-1187"]},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet."},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation.","examples":["Reviewed with finance"]},"lineCount":{"type":"number","description":"How many lines the revaluation has.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T11:20:04.219Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation line. Pass it in updateLines or deleteLines on PATCH inventory/inventory-revaluations/:id to change or remove the line."},"itemId":{"type":"string","description":"The unique identifier for the item being revalued. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock this line restates. The same item may be carried at a different cost in each warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates the cost of, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the revaluation's currency. You supply it and the platform checks it rather than deriving it. Read it from GET inventory/inventory-levels."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the revaluation's currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document, in the revaluation's currency. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize, in the revaluation's currency. Moving-average direct cost capitalization only."},"revaluationAmount":{"type":"string","format":"decimal","description":"The value this line moves on the balance sheet, in the revaluation's currency: (newUnitCost - currentUnitCost) x quantity."},"status":{"type":"string","description":"Where the line sits in the platform's own process. This is free text with no fixed set of values."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number."},"batchNumber":{"type":"string","description":"The batch number itself."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number."},"serialNumber":{"type":"string","description":"The serial number itself."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document. Direct cost capitalization on a sold serial only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit, so there must be exactly as many as the quantity says."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the revaluation as it now stands."}},"additionalProperties":false,"required":["id","documentStatus"]},"updateInventoryRevaluationInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Use format YYYY-MM-DD."},"costingValuationType":{"type":"string","description":"How the value change is recorded. Accepted values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the revaluation.","examples":["Reviewed with finance"]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item to revalue. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates. Must be greater than zero."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the legal entity's functional currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize. Moving-average direct cost capitalization only."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity","currentUnitCost","newUnitCost"]},"description":"The lines to add, each the same shape as a line on create."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change."},"itemId":{"type":"string","description":"The unique identifier for a different item. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates. Must be greater than zero."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the legal entity's functional currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize. Moving-average direct cost capitalization only."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, addressed by the id this endpoint publishes. Everything but the id is optional, and a tracking array replaces what that line had."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the lines to remove."}},"additionalProperties":false},"getPayrollTemplateOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll template."},"name":{"type":"string","description":"The name of the payroll template. Unique across payroll templates."},"description":{"type":"string","description":"A free-form description of the payroll template."},"groupBy":{"type":"string","description":"The level at which payroll amounts are entered. Possible values: 'Employee', 'Department', 'Multi-level'."},"journalEntryDate":{"type":"string","description":"The date the generated journal entry is posted on. Possible values: 'payrollDate', 'endDate'."},"journalEntryGroupBy":{"type":"string","description":"The default consolidation level for generated journal lines. Possible values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'."},"deductionsType":{"type":"string","description":"Whether deduction amounts in imported data arrive positive or negative. Possible values: 'positive', 'negative'."},"source":{"type":"string","description":"The payroll system this template imports from. Possible values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'."},"status":{"type":"string","description":"The lifecycle status of the payroll template. Possible values: 'create', 'active', 'inactive'. It is computed from the template's categories, not set through the API."},"clearingAccountId":{"type":"string","description":"The general ledger account payroll amounts are cleared through. See id on GET accounting/accounts/:id."},"entities":{"type":"array","items":{"type":"string"},"description":"The names of the legal entities this template is mapped to. An empty array when it is mapped to none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll category."},"name":{"type":"string","description":"The name of the category, for example 'Gross Salary'. Unique within the template."},"subType":{"type":"string","description":"The kind of payroll amount this category represents. Possible values: 'grossPay', 'deduction', 'netPay', 'employer'."},"status":{"type":"string","description":"The lifecycle status of the category. Possible values: 'active', 'inactive'."},"payee":{"type":"string","description":"Who the amount is paid to, as a payee code from your tenant's configured payee list, for example 'employee', 'payrollProvider', 'benefitsProvider' or 'taxOffice'."},"isManagedFromPayroll":{"type":"boolean","description":"Whether payments for this category are recorded through payroll rather than separately."},"debitAccountId":{"type":"string","description":"The general ledger account this category debits. See id on GET accounting/accounts/:id."},"debitJournalAggregation":{"type":"string","description":"The consolidation level for journal lines posted to the debit account. Absent means the template default applies."},"creditAccountId":{"type":"string","description":"The general ledger account this category credits. See id on GET accounting/accounts/:id."},"creditJournalAggregation":{"type":"string","description":"The consolidation level for journal lines posted to the credit account. Absent means the template default applies."},"debitTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension, e.g. 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category debits, one per dimension. Absent when none."},"creditTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension, e.g. 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category credits, one per dimension. Absent when none."}},"additionalProperties":false,"required":["id","name","subType"]},"description":"The payroll categories defined on this template, each mapping one payroll line type onto a debit and a credit account. An empty array when the template has none."}},"additionalProperties":false,"required":["id","name","groupBy","journalEntryDate","journalEntryGroupBy","deductionsType","entities","lastModifiedDate"]},"getItemTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item type.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"name":{"type":"string","description":"The display name of the item type, for example 'Stocked good'. Two item types cannot share a name.","examples":["Stocked good"]},"description":{"type":"string","description":"A free-form description of the item type.","examples":["Physical goods held in a warehouse"]},"procurable":{"type":"boolean","description":"Whether items of this type can appear on purchase documents.","examples":[true]},"stockable":{"type":"boolean","description":"Whether items of this type hold stock.","examples":[true]},"active":{"type":"boolean","description":"Whether the item type can be chosen for new items.","examples":[true]},"itemCount":{"type":"number","description":"The number of items that name this item type.","examples":[42]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the item type was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the item type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"updateExpenseReportOutput":{"type":"object","properties":{},"additionalProperties":false},"updateExpenseReportInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee the report belongs to, given as an id. See id on GET people/person/:id. Omit to leave unchanged."},"entityId":{"type":"string","description":"The legal entity the report is posted under, given as an id. See id on GET base/entities. Omit to leave unchanged."},"reimbursementCurrency":{"type":"string","description":"The currency the employee is reimbursed in. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"submittedDate":{"type":"string","format":"date","description":"The date the report is submitted. Use format YYYY-MM-DD. Omit to leave unchanged."},"departmentId":{"type":"string","description":"The department the report is charged to, given as an id. See id on GET people/departments/:id. Omit to leave unchanged."},"offsetAccountId":{"type":"string","description":"The GL offset account for the reimbursement, given as an id. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"externalExpenseReportId":{"type":"string","description":"The identifier this report has in the upstream system that produced it. Omit to leave unchanged."},"externalUrl":{"type":"string","description":"A link to the report in the upstream system that produced it. Omit to leave unchanged."},"origin":{"type":"string","description":"The source system this report came from, as free-form text. Omit to leave unchanged."},"markAsPaid":{"type":"boolean","description":"Whether the report is marked paid. Omit to leave unchanged."},"createExpenseItems":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount of the expense, as a decimal in this item's own currency."},"currency":{"type":"string","description":"The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency."},"billDate":{"type":"string","format":"date","description":"The date on the receipt. Use format YYYY-MM-DD."},"merchant":{"type":"string","description":"The merchant the expense was paid to, as printed on the receipt."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense."},"categoryId":{"type":"string","description":"The expense category this item is booked under. See id on GET accounting/expense-categories/:id."},"accountId":{"type":"string","description":"The general ledger account this item's journal entry uses. See id on GET accounting/accounts/:id. Omit to let the category decide."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursed to the employee. Defaults to true."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"origin":{"type":"string","description":"The source system this item came from, as free-form text."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it. Free text."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Receipts for this item, each naming an already-uploaded file by its id. Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the item's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this item over, one per accounting book. A new item has nothing to change or remove, so this is a plain array, the same shape POST accounting/expense-reports takes."}},"additionalProperties":false,"required":["amount","currency","billDate","merchant","expenseType"]},"description":"The expense items to add. Omit for no additions.","examples":[[{"amount":"12.50","currency":"EUR","billDate":"2026-08-21","merchant":"Taxi","expenseType":"Pur"}]]},"updateExpenseItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense item to change. It must belong to this report."},"amount":{"type":"string","format":"decimal","description":"The amount of the expense, as a decimal in this item's own currency."},"currency":{"type":"string","description":"The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency."},"billDate":{"type":"string","format":"date","description":"The date on the receipt. Use format YYYY-MM-DD."},"merchant":{"type":"string","description":"The merchant the expense was paid to, as printed on the receipt."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense."},"categoryId":{"type":"string","description":"The expense category this item is booked under. See id on GET accounting/expense-categories/:id."},"accountId":{"type":"string","description":"The general ledger account this item's journal entry uses. See id on GET accounting/accounts/:id. Omit to let the category decide."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursed to the employee. Defaults to true."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"origin":{"type":"string","description":"The source system this item came from, as free-form text."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it. Free text."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Receipts for this item, each naming an already-uploaded file by its id. Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the item's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this item, each with no id. Omit for no additions. Send none of the three amortization arrays to leave this item's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the schedule to change. It must be one this item already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit to leave unchanged."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'. Omit to leave unchanged."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. Omit to leave unchanged."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD. Omit to leave unchanged."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Omit to leave unchanged."},"description":{"type":"string","description":"A note to record against the schedule. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by the id the report publishes. A schedule that has already started recognizing is refused with AMORTIZATION_SCHEDULE_POSTED. Omit for no changes."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this item. Each must be one this item carries, and one that has not started recognizing. Removing a schedule leaves this item's other books untouched."}},"additionalProperties":false,"required":["id"]},"description":"The expense items to change, each addressed by the id the report publishes. Every field but the id is optional, and omitting one leaves it unchanged. Omit for no changes."},"deleteExpenseItems":{"type":"array","items":{"type":"string"},"description":"The ids of expense items to remove, applied before the updates and creates. Each must belong to this report. Omit for no deletions. Removing an item also removes the amortization schedules it carried."}},"additionalProperties":false},"bulkDeleteLandedCostItemsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted landed cost item. Format: UUID."}},"additionalProperties":false,"required":["id"]},"description":"The deleted landed cost items, in the order you sent them."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteLandedCostItemsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the landed cost items to delete. Format: UUID.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"rejectPurchaseOrderOutput":{"type":"object","properties":{"status":{"type":"string","description":"The approval status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"rejectPurchaseOrderInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the order is being rejected, recorded against the approval decision. Omit for none.","examples":["Budget not approved for this quarter"]}},"additionalProperties":false},"updateSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you.","examples":["SR-1042"]},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The name of that customer.","examples":["Bakker Retail B.V."]},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line.","examples":["55120"]},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'.","examples":["SalesDelivery"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number.","examples":["RMA-2026-0087"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back.","examples":["3SABCD7654321"]},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency.","examples":["96.00"]},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency.","examples":["0.00"]},"notes":{"type":"string","description":"Free text on the document.","examples":["Customer reports transit damage"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:05:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"4.00","inventoryQuantity":"4.00","openQuantity":"4.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateSalesReturnInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"A new customer for the return. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"documentDate":{"type":"string","format":"date","description":"A new document date. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"A new expected-back date. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"A new currency for the return's amounts. Format ISO 4217, for example 'EUR'."},"referenceNumber":{"type":"string","description":"A new customer reference."},"trackingNumber":{"type":"string","description":"A new carrier tracking number.","examples":["3SABCD7654321"]},"returnType":{"type":"string","description":"A new classification for the return."},"returnFeeAmount":{"type":"string","format":"decimal","description":"A new fee across the return, in the document's currency."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove. Applied before the other two arrays."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line belonging to another return is rejected, not skipped."},"itemId":{"type":"string","description":"A new item for the line. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"A new warehouse for the line. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"A new unit for the line's quantity. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, in the line's unit. Greater than zero when given."},"unitPrice":{"type":"string","format":"decimal","description":"A new unit value, in the document's currency."},"condition":{"enum":["NEW","GOOD","USED","OPENED","DAMAGED","DEFECTIVE","EXPIRED","REFURBISHED"],"description":"A new expected condition."},"disposition":{"enum":["RETURN_TO_STOCK","RETURN_TO_VENDOR","SCRAP","DONATE","REPAIR","REWORK","CREDIT_ONLY"],"description":"A new intended disposition."},"reasonCode":{"type":"string","description":"A new customer-facing reason."},"reasonCodeId":{"type":"string","description":"A new internal reason code. See id on GET inventory/reason-codes/:id."},"returnFeeAmount":{"type":"string","format":"decimal","description":"A new fee for this line, in the document's currency."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch coming back, as batchNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line returns to. Given beside batchNumberId, it must be that batch's own number."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches coming back on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. On PATCH inventory/sales-returns/:id this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit coming back, as serialNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line returns to. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units coming back, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. On PATCH inventory/sales-returns/:id this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry may name a batchNumber or serialNumber of its own line. On PATCH inventory/sales-returns/:id this replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"4.00"}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency. Omit it to take the price from the sale."},"condition":{"enum":["NEW","GOOD","USED","OPENED","DAMAGED","DEFECTIVE","EXPIRED","REFURBISHED"],"description":"The condition the goods are expected in. The inspection may find otherwise and restates it."},"disposition":{"enum":["RETURN_TO_STOCK","RETURN_TO_VENDOR","SCRAP","DONATE","REPAIR","REWORK","CREDIT_ONLY"],"description":"What you intend to do with the goods. The inspection may change it."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code. See id on GET inventory/reason-codes/:id."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return follows a delivery. It is a line's id on GET inventory/shipments/:id. Naming it lets the commit value the return from the original shipment cost."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch coming back, as batchNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line returns to. Given beside batchNumberId, it must be that batch's own number."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches coming back on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. On PATCH inventory/sales-returns/:id this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit coming back, as serialNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line returns to. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units coming back, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. On PATCH inventory/sales-returns/:id this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry may name a batchNumber or serialNumber of its own line. On PATCH inventory/sales-returns/:id this replaces the line's bin entries."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"Lines to add."}},"additionalProperties":false},"createEmployeeAdvanceRequestOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) assigned to the newly created advance request.","examples":["b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"]}},"additionalProperties":false,"required":["id"]},"createEmployeeAdvanceRequestInput":{"type":"object","properties":{"categoryId":{"type":"string","description":"Id (a UUID) of the AdvancePaymentCategory this request draws from. Must belong to the calling employee's own entity.","examples":["5c8e2f14-9a3b-4d67-8e21-1b4c6a9d3e02"]},"amount":{"type":"string","format":"decimal","description":"Requested amount, in the calling employee's entity functional currency. Must be greater than zero. Stored as the request's single purpose line.","examples":["750.00"]},"purpose":{"type":"string","description":"What the advance is for, e.g. the trip or event. Required, non-blank. Stored as the request's single purpose line.","examples":["Client site visit — flights and hotel"]},"tripStart":{"type":"string","format":"date","description":"First day of the trip the advance covers. Optional.","examples":["2026-09-10"]},"tripEnd":{"type":"string","format":"date","description":"Last day of the trip the advance covers. Must not be before tripStart. Optional.","examples":["2026-09-13"]},"notes":{"type":"string","description":"Free-text notes from the requester. Optional."},"requestDate":{"type":"string","format":"date","description":"The requester's own calendar day, as observed client-side. Omit to default to the appserver's current day."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"Display name of the attached file."},"fileId":{"type":"string","description":"Id of the already-uploaded file."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the request. Each names an already-uploaded file by its id. A tenant may require at least one; see ATTACHMENT_REQUIRED.","examples":[[{"fileName":"itinerary.pdf","fileId":"3f9c1e2a-7b4d-4e6f-9a1c-2d5e8f0b6c3a"}]]}},"additionalProperties":false,"required":["categoryId","amount","purpose"]},"updateWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'.","examples":["WTR-2291"]},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed."},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'."},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document.","examples":["Consolidated with WTR-2290"]},"lineCount":{"type":"number","description":"The number of lines on the transfer.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T11:20:04.219Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer line. updateLines and deleteLines address lines by it."},"itemId":{"type":"string","description":"The item being moved. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from, the document's warehouse applied to every line. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much moves, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"transferCost":{"type":"string","format":"decimal","description":"What one unit left the source warehouse at, in the transfer's currency. The valuation method sets it at commit. Absent on a draft."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit on an intercompany transfer, in the contractual currency. Supplied on create."},"totalTransferValue":{"type":"string","format":"decimal","description":"The line's total on an intercompany transfer, in the contractual currency: totalTransferValue = unitTransferValue x quantity. Written by the platform."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this line has come back on an intercompany return."},"status":{"type":"string","description":"The status of the line."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number. See id on GET inventory/batch-numbers/:id."},"batchNumber":{"type":"string","description":"The batch number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"What this batch moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The batches that make up the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number. See id on GET inventory/serial-numbers/:id."},"serialNumber":{"type":"string","description":"The serial number."},"quantity":{"type":"string","format":"decimal","description":"Always one, for a serialized unit."},"unitCost":{"type":"string","format":"decimal","description":"What this unit moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The serialized units that move."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"fromBinLocationCode":{"type":"string","description":"The code of that bin."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"toBinLocationCode":{"type":"string","description":"The code of that bin."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer. The collection GET inventory/warehouse-transfers returns lineCount in place of these."}},"additionalProperties":false,"required":["id","documentStatus"]},"updateWarehouseTransferInput":{"type":"object","properties":{"locationId":{"type":"string","description":"The warehouse the goods leave, applied to every line. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. It must differ from locationId. See id on GET inventory/warehouses/:id."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer. Use format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"notes":{"type":"string","description":"Free text on the document.","examples":["Consolidated with WTR-2290"]},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. Required on a new line. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit, in the transfer's contractual currency. Required on an intercompany transfer. The two entities agree the price, and the API cannot derive it from a cost."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the goods leave. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches that make up the line's quantity. Required for a batch-tracked item, and they must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the goods leave. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units that move. Required for a serialized item, one entry per unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false,"required":["quantity"]},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one. Leave both names off for a quantity that moves at line level."}},"additionalProperties":false,"required":["itemId","quantity"]},"description":"Lines to add. Same shape as on create."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. Leave it out to keep the line's current unit. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit, in the transfer's contractual currency. Required on an intercompany transfer. The two entities agree the price, and the API cannot derive it from a cost."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the goods leave. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches that make up the line's quantity. Required for a batch-tracked item, and they must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the goods leave. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units that move. Required for a serialized item, one entry per unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false,"required":["quantity"]},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one. Leave both names off for a quantity that moves at line level."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by its id. Every field but the id is optional, and a tracking array you send replaces what the line had."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of lines to remove. They are applied before the updates and the creates."}},"additionalProperties":false},"reverseVendorBillOutput":{"type":"object","properties":{},"additionalProperties":false},"reverseVendorBillInput":{"type":"object","properties":{"reversalDate":{"type":"string","format":"date","description":"The date the reversing journal entry is posted on. Use format YYYY-MM-DD. Choose a date whose period is open.","examples":["2026-09-30"]}},"additionalProperties":false,"required":["reversalDate"]},"searchShipmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment."},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"businessPartnerName":{"type":"string","description":"The display name of that customer."},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id."},"shipmentCarrierName":{"type":"string","description":"The name of that carrier."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods."},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment."},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it."},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency."},"notes":{"type":"string","description":"Free text on the shipment."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The shipments on this page, each with its lines. An empty array when nothing matches.","examples":[[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"SHIPPED","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-15T07:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more shipments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchShipmentsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the shipment with this document number. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to shipments with this status. The match is exact. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'."},"entityId":{"type":"string","description":"Limits results to shipments for the legal entity with this identifier."},"businessPartnerId":{"type":"string","description":"Limits results to shipments for the customer with this identifier. Despite the name, this is a customer id."},"locationId":{"type":"string","description":"Limits results to shipments with a line for the warehouse with this identifier."},"itemId":{"type":"string","description":"Limits results to shipments with a line for the item with this identifier."},"referenceNumber":{"type":"string","description":"Limits results to the shipment with this customer reference. The match is exact."},"trackingNumber":{"type":"string","description":"Limits results to the shipment with this carrier tracking number. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to shipments dated on or after this date. Format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to shipments dated on or before this date. Format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to shipments changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A shipment must match every filter you send. Send an empty object to return all shipments.","examples":[{"documentStatus":"SHIPPED"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of shipments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"getExpenseCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense category."},"category":{"type":"string","description":"The display name of the expense category, for example 'Meals'. Unique within the tenant."},"categoryType":{"type":"string","description":"The kind of expense. Possible values: 'Pur', 'Dis', 'PerDiem'. 'Dis' is distance traveled."},"reimbursable":{"type":"boolean","description":"Whether expenses in this category are reimbursed to the employee."},"status":{"type":"string","description":"The lifecycle status of the expense category. Possible values: 'active', 'inactive'. An inactive category stays readable so historical expense items still resolve, and is not offered for new ones."},"requireAttachment":{"type":"boolean","description":"Whether an expense in this category must have a receipt attachment."},"requireAttendees":{"type":"boolean","description":"Whether an expense in this category must list attendees."},"externalId":{"type":"string","description":"The identifier this category has in an external system. It is not unique."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the expense category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","category","reimbursable","lastModifiedDate"]},"commitSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentStatus":{"type":"string","description":"The status the return is now in, read back from the document. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["RECEIVED"]},"creditMemoId":{"type":"string","description":"The unique identifier for the credit memo this commit raised, where it raised one. Absent for an inventory-only return, and its absence never means the commit failed. See id on GET accounting/credit-memos/:id."},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from this step. An empty array on a clean run. The step succeeded whatever is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitSalesReturnInput":{"type":"object","properties":{"approvalNotes":{"type":"string","description":"Free text recorded with the commit, added to the return's notes for audit.","examples":["RMA verified against the delivery"]}},"additionalProperties":false},"approvePurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentStatus":{"type":"string","description":"The status of the purchase return after the approval. It is 'APPROVED'.","examples":["APPROVED"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings about the approval. Empty when there are no warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"approvePurchaseReturnInput":{"type":"object","properties":{},"additionalProperties":false},"approveExpenseReportOutput":{"type":"object","properties":{"status":{"type":"string","description":"The approval status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"approveExpenseReportInput":{"type":"object","properties":{},"additionalProperties":false},"purchaseReturnsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID."},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The purchase return number, for example 'PRTR-1043'."},"documentStatus":{"type":"string","description":"The status of the purchase return. Possible values: 'DRAFT', 'APPROVED', 'PREPARED', 'SHIPPED', 'COMMITTED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', 'COMPLETED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD."},"deliveryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"businessPartnerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor the goods go back to."},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reference number of the purchase return."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the purchase return's amounts. Format: ISO 4217, for example 'EUR'."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines on the purchase return."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Notes on the purchase return."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteEmployeeAdvanceRequestOutput":{"type":"object","properties":{},"additionalProperties":false},"getInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned.","examples":["DEC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse location.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse location.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory decrease.","examples":["August cycle count"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"deleteExpenseCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteReasonCodesOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted reason code."},"code":{"type":"string","description":"The business code the deleted reason code held."}},"additionalProperties":false,"required":["id","code"]},"description":"The deleted reason codes, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteReasonCodesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the reason codes to delete. If any identifier matches nothing or its reason code is still named on a document, nothing is deleted and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"purchaseOrdersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase order."},"poNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The purchase order number, for example 'PO-3'. Absent while none has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description of the order, shown to the vendor."},"internalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Internal notes on the order, not shown to the vendor."},"externalMemo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A memo intended for the vendor."},"externalPONumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The order reference in the vendor's or an upstream system. It is not unique."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status of the order. Possible values: 'approved', 'pendingApproval', 'rejected'."},"budgetStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The budget-check status of the order. Possible values: 'approved', 'rejected', 'pendingApproval'. Independent of approvalStatus."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The order lifecycle status. Possible values: 'open', 'inprogress', 'closed', 'overMatched'. This is not the vendor-bill matching status, which is per line in each line's matchStatus."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the order is denominated in. Format ISO 4217, for example 'USD'. Governs every amount on the order and its lines."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total ordered amount, the sum of the line totals, in the order currency."},"invoicedTotalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion of the order already invoiced by vendor bills, in the order currency."},"receivedTotalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion of the order already received as goods, in the order currency."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period the order covers. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period the order covers. Format YYYY-MM-DD."},"needByDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment-terms code applied to this order, for example 'net30', 'net60', 'dueOnReceipt' or 'custom'. Inherited from the vendor unless overridden."},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor this order is placed with."},"vendorContactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The main contact email at the vendor."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this order is placed by."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createExpenseReportOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created expense report.","examples":["c7d2e910-3b45-4f68-8a91-2d3e4f5a6b78"]}},"additionalProperties":false,"required":["id"]},"createExpenseReportInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee the report belongs to. See id on GET people/person/:id.","examples":["5f1b8c02-7d34-4e56-9a78-1b2c3d4e5f60"]},"entityId":{"type":"string","description":"The legal entity the report is posted under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"reimbursementCurrency":{"type":"string","description":"The currency the employee is reimbursed in. Format ISO 4217, for example 'USD'. Individual items may be in other currencies.","examples":["EUR"]},"submittedDate":{"type":"string","format":"date","description":"The date the report is submitted. Use format YYYY-MM-DD.","examples":["2026-08-27"]},"departmentId":{"type":"string","description":"The department the report is charged to. See id on GET people/departments/:id."},"offsetAccountId":{"type":"string","description":"The GL offset account for the reimbursement. See id on GET accounting/accounts/:id."},"externalExpenseReportId":{"type":"string","description":"The identifier this report has in the upstream system that produced it. It is not unique."},"externalUrl":{"type":"string","description":"A link to the report in the upstream system that produced it."},"origin":{"type":"string","description":"The source system this report came from, as free-form text."},"markAsPaid":{"type":"boolean","description":"Whether to mark the report paid on creation. Defaults to false."},"skipJournalEntry":{"type":"boolean","description":"Whether to skip journal-entry creation for this report. Defaults to false."},"expenseItems":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount of the expense, as a decimal in this item's own currency."},"currency":{"type":"string","description":"The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency."},"billDate":{"type":"string","format":"date","description":"The date on the receipt. Use format YYYY-MM-DD."},"merchant":{"type":"string","description":"The merchant the expense was paid to, as printed on the receipt."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense."},"categoryId":{"type":"string","description":"The expense category this item is booked under. See id on GET accounting/expense-categories/:id."},"accountId":{"type":"string","description":"The general ledger account this item's journal entry uses. See id on GET accounting/accounts/:id. Omit to let the category decide."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursed to the employee. Defaults to true."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"origin":{"type":"string","description":"The source system this item came from, as free-form text."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it. Free text."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Receipts for this item, each naming an already-uploaded file by its id. Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the item's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency. It is required here, because a schedule without one cannot be turned into installments when the report posts."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this item over, one per accounting book. An expense item has no line type, so what makes it amortizable is its account: the category or account it books to must be a prepaid-expenses account. Each schedule starts out not started and begins recognizing once the report posts."}},"additionalProperties":false,"required":["amount","currency","billDate","merchant","expenseType"]},"description":"The expense items on the report, in the order they should appear. At least one is expected.","examples":[[{"amount":"48.90","currency":"EUR","billDate":"2026-08-20","merchant":"Deutsche Bahn","expenseType":"Pur"}]]}},"additionalProperties":false,"required":["employeeId","entityId","reimbursementCurrency","submittedDate","expenseItems"]},"updateReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created.","examples":["GR-2291"]},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The legal entity the receipt belongs to.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The vendor the goods came from.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of that vendor.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number.","examples":["DN-77121"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency.","examples":["712.20"]},"notes":{"type":"string","description":"Free text on the receipt.","examples":["Received at the back dock"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:45:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"196.00","inventoryQuantity":"196.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"627.20","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateReceiptInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"A new vendor for the receipt."},"documentDate":{"type":"string","format":"date","description":"A new date for the receipt. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"A new delivery date. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"A new currency for the receipt's amounts. Format ISO 4217, for example 'EUR'."},"referenceNumber":{"type":"string","description":"A new vendor reference.","examples":["DN-77121"]},"trackingNumber":{"type":"string","description":"New carrier tracking number. Send an empty string to clear it; omit the property to leave it as it is.","examples":["1Z999AA10123456784"]},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of lines to remove. Applied before updateLines and createLines."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line that belongs to another receipt is rejected."},"lineType":{"enum":["Inventory","Service","Expense"],"description":"A new type for the line."},"itemId":{"type":"string","description":"A new item for the line."},"serviceDescription":{"type":"string","description":"A new description, on a Service or Expense line."},"locationId":{"type":"string","description":"A new warehouse for the line."},"unitId":{"type":"string","description":"A new unit for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, in the line's unit. Greater than zero when given."},"unitPrice":{"type":"string","format":"decimal","description":"A new unit price, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"A new line total, in the receipt's currency. It must equal quantity × unitPrice, rounded to the currency's decimals, taking each from this item or else from the stored line, or the request fails with LINE_TOTAL_MISMATCH. Leave it out to have the total recalculated from quantity and unitPrice. A line without a quantity or unitPrice takes it as given."},"expenseAccountId":{"type":"string","description":"A new general ledger account for a Service or Expense line."},"notes":{"type":"string","description":"New free text. Send an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."}},"additionalProperties":false},"description":"The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods go into."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"196.00"}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"lineType":{"enum":["Inventory","Service","Expense"],"description":"What this line receives. Defaults to Inventory. An Inventory line needs itemId, unitId, locationId and quantity, because it moves stock into a warehouse. A Service or Expense line needs serviceDescription and an amount, and has no item or warehouse. A line with a description and no item is taken as a Service line."},"itemId":{"type":"string","description":"The item received. Required on an Inventory line, and not used on a Service or Expense line."},"serviceDescription":{"type":"string","description":"What was bought. Required on a Service or Expense line, and not used on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods go into. Required on an Inventory line."},"unitId":{"type":"string","description":"The unit the quantity is counted in. Required on an Inventory line."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in that unit. Required on an Inventory line, and greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency. Leave it out to have it calculated as quantity × unitPrice, rounded to the currency's decimals. When quantity and unitPrice are also given it must equal that, once rounded the same way, or the request fails with LINE_TOTAL_MISMATCH. On a Service or Expense line without a quantity or unitPrice it is taken as given, and such a line needs this or a unitPrice."},"expenseAccountId":{"type":"string","description":"The general ledger account to charge. Required on a Service or Expense line, or the request fails with INCOMPLETE_LINE. Not used on an Inventory line."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line receives against, as its id under lines on GET accounting/purchase-orders/:id. Its numeric id in string form is also accepted. The line type is set from it."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."}},"additionalProperties":false},"description":"The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods go into."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries."}},"additionalProperties":false},"description":"The lines to add."}},"additionalProperties":false},"purchaseRequestsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase request."},"purchaseRequestNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The purchase request number, for example 'PR-1', unique across purchase requests. Absent until one has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of what is being requested. It is shown to the vendor."},"internalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Internal notes on the request, not shown to the vendor."},"externalMemo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A memo intended for the vendor."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lifecycle and approval state, in one field. Possible values: 'pendingApproval', 'approved', 'rejected', 'closed'. This resource has no separate approvalStatus."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the request is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total requested amount, the sum of the line totals, in the request currency."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period the request covers. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period the request covers. Format YYYY-MM-DD."},"needByDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment-terms key requested for the resulting order, for example 'net30'."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this request has in the upstream system that produced it. It is not unique."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this request belongs to."},"departmentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the department raising the request."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase request last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchReasonCodesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the reason code."},"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. It is unique within the tenant."},"description":{"type":"string","description":"A free-form description of what the reason code means. Absent when none was given."},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. When false, existing documents keep it and new ones cannot select it."},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect."},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The document types this reason code may be selected on, in a stable order. An empty array when it is linked to none. This is the reason code's full set. Filtering by documentType narrows which reason codes are returned, not the set each one reports."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the reason code record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change it."}},"additionalProperties":false,"required":["id","code","documentTypes"]},"description":"The reason codes on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","code":"DAMAGE","description":"Stock damaged in the warehouse","isActive":true,"requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more reason codes remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchReasonCodesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"code":{"type":"string","description":"Limits results to the reason code with this code. The match is exact. Codes are unique, so this matches at most one reason code."},"isActive":{"type":"boolean","description":"Limits results to reason codes that can be selected on new documents when true, or to retired ones when false. Omit to match both."},"requiresApproval":{"type":"boolean","description":"Limits results to reason codes that require approval when true, or that do not when false. Omit to match both."},"documentType":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"],"description":"Limits results to the reason codes linked to this document type. This filter is available only here, not on the collection. A document type nothing is linked to returns an empty page, not an error."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to reason codes changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change lastModifiedDate."}},"additionalProperties":false,"description":"The filters to apply. A reason code must match every filter you send. Send an empty object to return all reason codes.","examples":[{"documentType":"InventoryDecrease","isActive":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of reason codes per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"vendorBillsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor bill."},"vendorBillNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor bill number. Stable across edits."},"billNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors."},"billDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date printed on the vendor's invoice. Format YYYY-MM-DD."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services were delivered. Format YYYY-MM-DD. Absent when not recorded."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date payment is due. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the bill is denominated in. Format ISO 4217, for example 'USD'. Governs total, amountPaid and openAmount."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'."},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"postingStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting posting status, defined by the accounting subsystem, for example 'notPosted', 'posted' or 'postingFailed'."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment-terms key applied to this bill, for example 'net30', 'net60' or 'dueOnReceipt'."},"total":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total bill amount, gross, in the bill currency."},"amountPaid":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cumulative amount paid against this bill so far, in the bill currency."},"openAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The outstanding amount still owed, total minus amountPaid, in the bill currency."},"payableAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount owed to the vendor, in the bill currency (see `currency`): the bill lines — a reverse-charge line at its net amount, any other at its gross amount — less withholding tax. An AP aging starts from it."},"markAsPaid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when the bill was marked as paid without a recorded payment. An AP aging leaves such bills out."},"externalVendorBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this bill has in the upstream system that produced it. It is not unique."},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor this bill is from."},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor the bill is from."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this bill is posted under."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity the bill is addressed to."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the vendor bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteAccountDeterminationRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique.","examples":["Finished goods — receipts"]}},"additionalProperties":false,"required":["id","ruleName"]},"rejectEmployeeAdvanceRequestOutput":{"type":"object","properties":{"status":{"type":"string","description":"Status after the operation. The workflow decides it, so it is read back rather than assumed.","examples":["rejected"]}},"additionalProperties":false,"required":["status"]},"rejectEmployeeAdvanceRequestInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the request is being rejected. Recorded as the request's decisionNote and shown to the requester. Omit to leave no note.","examples":["Trip was cancelled"]}},"additionalProperties":false},"commitWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentStatus":{"type":"string","description":"The status of the transfer, read back from the document. 'COMMITTED' on success.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The journal entry the commit wrote. Absent when the posting produced none, as on an intercompany return that writes two entries and names neither, or a movement with no financial posting. See id on GET accounting/journal-entries/:id.","examples":["6b31d0a7-4e28-4c95-8f13-2a7e0c5d9b64"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the posting. An empty array on a clean run. The commit succeeded whatever it lists.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitWarehouseTransferInput":{"type":"object","properties":{},"additionalProperties":false},"updatePayrollTemplateOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePayrollTemplateInput":{"type":"object","properties":{"name":{"type":"string","description":"The new name. Omit to leave it unchanged. It must stay unique across payroll templates."},"groupBy":{"type":"string","description":"The new grouping. Accepted values: 'Employee', 'Department', 'Multi-level'. Omit to leave it unchanged."},"journalEntryDate":{"type":"string","description":"The new journal entry date rule. Accepted values: 'payrollDate', 'endDate'. Omit to leave it unchanged."},"journalEntryGroupBy":{"type":"string","description":"The new default journal aggregation. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'. Omit to leave it unchanged."},"description":{"type":"string","description":"The new description. Omit to leave it unchanged.","examples":["Revised for 2027"]},"clearingAccountId":{"type":"string","description":"The new clearing account. Omit to leave it unchanged. See id on GET accounting/accounts/:id."},"source":{"type":"string","description":"The new source. Accepted values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'. Omit to leave it unchanged."},"entityIds":{"type":"array","items":{"type":"string"},"description":"The complete set of legal entities this template serves. Sending it replaces the assignment. Omit it to leave the current set unchanged. At least one entity if sent. See id on GET base/entities."},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of an existing category to keep. Omit for a new category. It must belong to this template."},"name":{"type":"string","description":"The name of the category. Unique within the template."},"subType":{"type":"string","description":"What the category represents. Accepted values: 'grossPay', 'deduction', 'netPay', 'employer'. At most one netPay category per template."},"status":{"type":"string","description":"Whether the category is usable. Accepted values: 'active', 'inactive'. Defaults to 'active'."},"payee":{"type":"string","description":"Who gets paid, as a payee code from your tenant's configured payee list, for example 'employee', 'payrollProvider', 'benefitsProvider' or 'taxOffice'."},"isManagedFromPayroll":{"type":"boolean","description":"Whether payment for this category is managed from payroll. Required, the category model has no default."},"debitAccountId":{"type":"string","description":"The account debited for this category. See id on GET accounting/accounts/:id."},"creditAccountId":{"type":"string","description":"The account credited for this category. See id on GET accounting/accounts/:id."},"debitJournalAggregation":{"type":"string","description":"How debit journal lines are aggregated. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'. Defaults to the template's setting. 'payrollCategoryByEmployee' requires groupBy 'Employee'."},"creditJournalAggregation":{"type":"string","description":"How credit journal lines are aggregated. The same values and rule as the debit side apply."},"debitTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension. Accepted values: 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category debits, at most one per dimension. Supported dimension: 'vendor'. Requires debitJournalAggregation to be above 'account'."},"creditTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension. Accepted values: 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category credits. The same values and rules as the debit side apply."}},"additionalProperties":false,"required":["name","subType","isManagedFromPayroll"]},"description":"The complete set of categories. Sending it replaces them. Include an existing category with its id to keep it, and leave one out to delete it. Omit the field to leave the stored categories unchanged.","examples":[[{"id":"6c9e2b41-8a35-4f70-b183-2d5a7c04e916","name":"Gross Pay","subType":"grossPay","isManagedFromPayroll":false,"debitAccountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"},{"name":"Pension","subType":"deduction","payee":"benefitsProvider","isManagedFromPayroll":true,"creditAccountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"}]]}},"additionalProperties":false},"billWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279"]},"billingStatus":{"type":"string","description":"The billing status of the transfer, read back from the document. 'BILLED' on success.","examples":["BILLED"]},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id.","examples":["884213"]},"intercompanyBillNumber":{"type":"string","description":"The number of that bill.","examples":["IC-BILL-1042"]},"journalEntryId":{"type":"string","description":"The journal entry the billing wrote. See id on GET accounting/journal-entries/:id.","examples":["8c04a1e5-7b39-4d26-90f8-1e5a3c72d0b9"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the billing. An empty array on a clean run.","examples":[[]]}},"additionalProperties":false,"required":["id","billingStatus","warnings"]},"billWarehouseTransferInput":{"type":"object","properties":{},"additionalProperties":false},"deletePayrollPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"commitInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the committed inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentStatus":{"type":"string","description":"The status of the inventory increase after the commit, read back from the document. It is 'COMMITTED' on success.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The unique identifier for the journal entry the commit wrote. Absent when the posting produced none. See id on GET accounting/journal-entries/:id.","examples":["7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the posting, in practice soft bin-capacity breaches. An empty array on a clean commit. The commit succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitInventoryIncreaseInput":{"type":"object","properties":{},"additionalProperties":false},"deleteOutboundPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"allocationLineCount":{"type":"number","description":"The number of allocation lines on the landed cost. There is one allocation line for each selected receipt line that has an inventory item and takes a share of the charges. When it is 0, no stock takes a share of the charges, and committing the landed cost fails.","examples":[1]}},"additionalProperties":false,"required":["id"]},"updateLandedCostInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD. The inventory revaluations that the commit creates have this date, so it sets the date of the change in the stock's value. It must fall in an open accounting period."},"notes":{"type":"string","description":"Free text on the landed cost."},"receipts":{"type":"array","items":{"type":"object","properties":{"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"selectedLineIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the receipt lines to spread the charges over. Format: UUID. Each identifier must be the `id` of a line of the receipt named by `receiptId`. Omit to spread the charges over all of the receipt's lines. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."}},"additionalProperties":false,"required":["receiptId"]},"description":"The receipts whose stock the charges are spread over. Send at least one. Every receipt must have the `documentStatus` 'COMMITTED'."},"charges":{"type":"array","items":{"type":"object","properties":{"chargeId":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. The vendor bill is taken from the line, so you do not send it. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"allocationMode":{"type":"string","description":"How the charge is spread (allocated) over the receipt lines. Required. 'Weight' needs a gross weight, weight, or net weight on the item of every selected receipt line. 'Volume' needs a volume per unit on the item of every selected receipt line, or else a length, width, and height on every one. Weights and volumes are converted to the same unit before the charge is spread. See `grossWeight`, `weight`, `netWeight`, `weightUnit`, `volumePerUnit`, `volumeUnit`, `length`, `width`, and `height` on GET inventory/items/:id (getItem). Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the vendor bill line to use, in the functional currency of the landed cost's legal entity. It must be more than 0. To use what is left on the line, send `functionalLineTotal` minus `functionalAllocatedAmount` from GET inventory/landed-costs/vendor-bill-lines. The commit fails if this amount is more than what is left on the line."},"isSelected":{"type":"boolean","description":"Whether to spread the charge over the receipt lines. Defaults to true. A charge set to false is kept in the landed cost's charges, so you can set it back to true later, but the commit does not spread it."}},"additionalProperties":false,"required":["chargeId","amount"]},"description":"The charges to spread over the stock. Each charge comes from a line of an approved vendor bill. Send at least one.","examples":[[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"LineTotal","amount":"300"}]]}},"additionalProperties":false},"updatePurchaseRequestOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePurchaseRequestInput":{"type":"object","properties":{"vendorId":{"type":"string","description":"A new vendor for the request. See id on GET accounting/vendors/:id. Omit to leave unchanged."},"departmentId":{"type":"string","description":"A new department for the request. See id on GET people/departments/:id. Omit to leave unchanged."},"description":{"type":"string","description":"A new public-facing description. Omit to leave unchanged."},"internalDescription":{"type":"string","description":"A new internal description. Omit to leave unchanged."},"externalMemo":{"type":"string","description":"A new external memo. Omit to leave unchanged."},"paymentTerms":{"type":"string","description":"New payment terms, as a payment-terms key. Omit to leave unchanged."},"needByDate":{"type":"string","format":"date","description":"A new need-by date. Use format YYYY-MM-DD. Omit to leave unchanged.","examples":["2026-11-01"]},"startDate":{"type":"string","format":"date","description":"A new start date. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","format":"date","description":"A new end date. Use format YYYY-MM-DD. Omit to leave unchanged."},"createLines":{"type":"array","items":{"type":"object","properties":{"isItem":{"type":"boolean","description":"True for an item line, priced by quantity times price. False for an expense line."},"description":{"type":"string","description":"A description of what is being requested."},"itemId":{"type":"string","description":"The item being requested. See id on GET inventory/items/:id."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. See id on GET inventory/unit-of-measures/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"quantity":{"type":"string","format":"decimal","description":"The requested quantity, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, as a decimal."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, as a decimal."},"needByDate":{"type":"string","format":"date","description":"The date this line is needed by. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The expected delivery date. Use format YYYY-MM-DD."},"priority":{"type":"string","description":"The urgency of this line. Accepted values: 'high', 'medium', 'low'."}},"additionalProperties":false},"description":"Lines to add to this request. Same shape as on create, with no id, because the line does not exist yet. Omit for no additions."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this request."},"isItem":{"type":"boolean","description":"A new line kind. Omit to leave unchanged."},"description":{"type":"string","description":"A new description. Omit to leave unchanged."},"itemId":{"type":"string","description":"A new item. See id on GET inventory/items/:id. Omit to leave unchanged."},"unitOfMeasureId":{"type":"string","description":"A new unit of measure. See id on GET inventory/unit-of-measures/:id. Omit to leave unchanged."},"departmentId":{"type":"string","description":"A new department. See id on GET people/departments/:id. Omit to leave unchanged."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, as a decimal. Omit to leave unchanged."},"price":{"type":"string","format":"decimal","description":"A new unit price, as a decimal. Omit to leave unchanged."},"editableAmount":{"type":"string","format":"decimal","description":"A new manually entered amount, as a decimal. Omit to leave unchanged."},"needByDate":{"type":"string","format":"date","description":"A new need-by date. Use format YYYY-MM-DD. Omit to leave unchanged."},"deliveryDate":{"type":"string","format":"date","description":"A new expected delivery date. Use format YYYY-MM-DD. Omit to leave unchanged."},"priority":{"type":"string","description":"A new urgency. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by the id the request publishes. Every field but the id is optional and omitting it leaves that field unchanged. Omit for no changes.","examples":[[{"id":"8b3c1d02-7e46-4f95-b2a7-6d04e1c9f378","editableAmount":"1950.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of lines to remove, applied before the updates and creates. Each must belong to this request, and none may already be ordered on a purchase order."}},"additionalProperties":false},"applyStandalonePaymentOutput":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the created application."},"outboundPaymentId":{"type":"string","description":"Id (a UUID) of the outbound payment this application belongs to."},"appliedDocumentType":{"type":"string","description":"Kind of document settled."},"appliedDocumentId":{"type":"string","description":"Id of the settled document."},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["amount","currency"],"description":"Amount applied."},"appliedDate":{"type":"string","format":"date","description":"Date of application."}},"additionalProperties":false,"required":["id","outboundPaymentId","appliedDocumentType","appliedDocumentId","amount","appliedDate"]},"description":"The created applications, one per input line, in the same order."}},"additionalProperties":false,"required":["applications"]},"applyStandalonePaymentInput":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"outboundPaymentId":{"type":"string","description":"Id (a UUID) of the standalone outbound payment being applied."},"appliedDocumentType":{"type":"string","description":"Kind of document this line settles: 'VendorBillHeaderBase', 'ExpenseReportBase' or 'WithholdingTaxEntry'."},"appliedDocumentId":{"type":"string","description":"Id (a UUID) of the target document."},"amount":{"type":"string","format":"decimal","description":"Amount applied, in the payment's currency. Must be greater than zero and not exceed the lesser of the payment's remaining unapplied amount and the document's open balance."},"appliedDate":{"type":"string","format":"date","description":"Date of application. Must not precede the payment's own date. Omit to default to the payment's date."}},"additionalProperties":false,"required":["outboundPaymentId","appliedDocumentType","appliedDocumentId","amount"]},"description":"One or more application lines. All-or-nothing: the whole batch is rejected if any line fails a check.","examples":[[{"outboundPaymentId":"c91f4a22-6d90-4c53-8e17-9f2a4b6c8d06","appliedDocumentType":"VendorBillHeaderBase","appliedDocumentId":"d02f4a22-6d90-4c53-8e17-9f2a4b6c8d07","amount":"500.00"}]]}},"additionalProperties":false,"required":["lines"]},"searchPurchaseOrderOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase order."},"poNumber":{"type":"string","description":"The purchase order number, for example 'PO-3'. Absent while none has been assigned."},"description":{"type":"string","description":"The description of the order, shown to the vendor."},"internalDescription":{"type":"string","description":"Internal notes on the order, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo intended for the vendor."},"externalPONumber":{"type":"string","description":"The order reference in the vendor's or an upstream system. It is not unique."},"approvalStatus":{"type":"string","description":"The approval status of the order. Possible values: 'approved', 'pendingApproval', 'rejected'."},"budgetStatus":{"type":"string","description":"The budget-check status of the order. Possible values: 'approved', 'rejected', 'pendingApproval'. Independent of approvalStatus."},"status":{"type":"string","description":"The order lifecycle status. Possible values: 'open', 'inprogress', 'closed', 'overMatched'. This is not the vendor-bill matching status, which is per line in each line's matchStatus."},"currency":{"type":"string","description":"The currency the order is denominated in. Format ISO 4217, for example 'USD'. Governs every amount on the order and its lines."},"totalAmount":{"type":"string","format":"decimal","description":"The total ordered amount, the sum of the line totals, in the order currency."},"invoicedTotalAmount":{"type":"string","format":"decimal","description":"The portion of the order already invoiced by vendor bills, in the order currency."},"receivedTotalAmount":{"type":"string","format":"decimal","description":"The portion of the order already received as goods, in the order currency."},"startDate":{"type":"string","format":"date","description":"The first day of the period the order covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the order covers. Format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment-terms code applied to this order, for example 'net30', 'net60', 'dueOnReceipt' or 'custom'. Inherited from the vendor unless overridden."},"hasInventoryItems":{"type":"boolean","description":"Whether any line references an inventory item."},"vendorId":{"type":"string","description":"The vendor this order is placed with. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this order is placed with."},"vendorContactEmail":{"type":"string","description":"The main contact email at the vendor."},"entityId":{"type":"string","description":"The legal entity this order is placed by. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this order is placed by."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line number, for example 'POL-3'."},"description":{"type":"string","description":"A description of the line item."},"isItem":{"type":"boolean","description":"Whether the line is an item line. True when the line references an item, false when it is an expense line."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency. Set on item lines. On an expense line the amount is in editableAmount instead."},"editableAmount":{"type":"string","format":"decimal","description":"The directly entered line amount, in the order currency. Used on expense lines, where there is no unit price to multiply."},"total":{"type":"string","format":"decimal","description":"The line total, in the order currency: price times quantity on an item line, editableAmount on an expense line."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount applied to the line, as a percentage. 10 means 10%, not 0.10."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. It always matches the order currency."},"status":{"type":"string","description":"The delivery status of the line. Possible values: 'undelivered', 'delivering', 'delivered'."},"matchStatus":{"type":"string","description":"The vendor-bill matching status of the line. Possible values: 'unmatched', 'partiallyMatched', 'matched', 'overMatched'."},"invoicedStatus":{"type":"string","description":"The invoicing status of the line. Possible values: 'uninvoiced', 'partiallyInvoiced', 'invoiced', 'overInvoiced'."},"receivedStatus":{"type":"string","description":"The goods-receipt status of the line. Possible values: 'unreceived', 'partiallyReceived', 'received', 'overReceived'."},"invoicedQuantity":{"type":"string","format":"decimal","description":"The quantity invoiced against this line so far, as a decimal."},"invoicedAmount":{"type":"string","format":"decimal","description":"The amount invoiced against this line so far, in the order currency."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity received against this line so far, as a decimal."},"receivedAmount":{"type":"string","format":"decimal","description":"The amount received against this line so far, in the order currency."},"remainingAmount":{"type":"string","format":"decimal","description":"The amount still open on this line, in the order currency: the line total less what has been invoiced."},"startDate":{"type":"string","format":"date","description":"The first day of the period this line covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period this line covers. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date this line was delivered. Format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Format YYYY-MM-DD."},"unitOfMeasure":{"type":"string","description":"The name of the unit of measure for the quantity."},"unitOfMeasureId":{"type":"string","description":"The unit of measure for the quantity."},"itemId":{"type":"string","description":"The item this line orders. Present on item lines."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."}},"additionalProperties":false,"required":["id"]},"description":"The order line items, in their order on the order. An empty array when the order has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The purchase orders on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPurchaseOrderInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the purchase order with this identifier. GET accounting/purchase-orders/:id does the same more cheaply."},"poNumber":{"type":"string","description":"Limits results to the purchase order with this number, for example 'PO-3'. The match is exact."},"externalPONumber":{"type":"string","description":"Limits results to purchase orders with this external reference. The match is exact. It is not unique, so it can match several orders."},"approvalStatus":{"type":"string","description":"Limits results to orders in this approval status. Accepted values: 'approved', 'pendingApproval', 'rejected'. Any other value matches no purchase order."},"budgetStatus":{"type":"string","description":"Limits results to orders in this budget-check status. Accepted values: 'approved', 'rejected', 'pendingApproval'. Any other value matches no purchase order."},"currency":{"type":"string","description":"Limits results to orders denominated in this currency. Format ISO 4217, for example 'USD'."},"paymentTerms":{"type":"string","description":"Limits results to orders with this payment-terms code, for example 'net30'. The match is exact."},"vendorId":{"type":"string","description":"Limits results to orders placed with this vendor. See id on GET accounting/vendors/:id. An id that matches no vendor returns an empty page, not an error."},"entityId":{"type":"string","description":"Limits results to orders placed by this legal entity. See id on GET base/entities. An id that matches no entity returns an empty page, not an error."},"vendorName":{"type":"string","description":"Limits results to orders whose vendor name is exactly this. The match is case-sensitive. Use vendorId when you already have the id."},"entityName":{"type":"string","description":"Limits results to orders whose legal entity name is exactly this. The match is case-sensitive. Use entityId when you already have the id."}},"additionalProperties":false,"description":"The filters to apply. A purchase order must match every filter you send. Omit to return all purchase orders.","examples":[{"approvalStatus":"pendingApproval"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of purchase orders per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"createVendorCreditOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created vendor credit.","examples":["d52e1c69-3fa8-4b17-9e24-8c6fa0315bd7"]}},"additionalProperties":false,"required":["id"]},"createVendorCreditInput":{"type":"object","properties":{"vendorId":{"type":"string","description":"The vendor being credited. See id on GET accounting/vendors/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"entityId":{"type":"string","description":"The legal entity the credit is booked under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"referenceNumber":{"type":"string","description":"The vendor's credit memo reference number, as printed on the document.","examples":["CN-4471"]},"creditDate":{"type":"string","format":"date","description":"The date on the vendor's credit memo. Use format YYYY-MM-DD.","examples":["2026-08-01"]},"currency":{"type":"string","description":"The currency of the credit. Format ISO 4217, for example 'USD'. Governs every line amount and vatAmount, which are decimals.","examples":["EUR"]},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"lines":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The gross credit amount for the line, as a decimal in the credit currency."},"description":{"type":"string","description":"A description of the credit line."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is allocated to. There is no endpoint for it."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 19 means 19%, not 0.19."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the credit currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'expense' (a one-time credit) or 'prepaid' (a credit spread over several periods). Defaults to 'expense'."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency. It is required here, because a schedule without one cannot be turned into installments when the credit posts."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. Only a line whose lineType is 'prepaid' may carry them. Each schedule starts out not started and begins recognizing once the credit posts."}},"additionalProperties":false,"required":["amount"]},"description":"The line items of the credit, in the order they should appear. At least one is expected. A credit with no lines credits nothing.","examples":[[{"amount":"300.00","description":"Returned goods","vatPercentage":"19.00"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the credit. Each names an already-uploaded file by its id."}},"additionalProperties":false,"required":["vendorId","entityId","referenceNumber","creditDate","currency","lines"]},"unapplyVendorCreditOutput":{"type":"object","properties":{},"additionalProperties":false},"unapplyVendorCreditInput":{"type":"object","properties":{"vendorBillIds":{"type":"array","items":{"type":"string"},"description":"The vendor bills to detach this credit from. See id on GET accounting/vendor-bills/:id. Omit to detach every application the credit has.","examples":[["9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95"]]}},"additionalProperties":false},"searchVendorBillOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor bill."},"vendorBillNumber":{"type":"string","description":"The vendor bill number. Stable across edits."},"billNumber":{"type":"string","description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors."},"billDate":{"type":"string","format":"date","description":"The date printed on the vendor's invoice. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD. Absent when not recorded."},"dueDate":{"type":"string","format":"date","description":"The date payment is due. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the bill is denominated in. Format ISO 4217, for example 'USD'. Governs total, amountPaid, openAmount and every line amount."},"status":{"type":"string","description":"The approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'."},"paymentStatus":{"type":"string","description":"The payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"postingStatus":{"type":"string","description":"The accounting posting status, defined by the accounting subsystem, for example 'notPosted', 'posted' or 'postingFailed'."},"paymentTerms":{"type":"string","description":"The payment-terms key applied to this bill, for example 'net30', 'net60' or 'dueOnReceipt'. Inherited from the vendor unless overridden."},"total":{"type":"string","format":"decimal","description":"The total bill amount, gross, in the bill currency."},"amountPaid":{"type":"string","format":"decimal","description":"The cumulative amount paid against this bill so far, in the bill currency."},"openAmount":{"type":"string","format":"decimal","description":"The outstanding amount still owed, total minus amountPaid, in the bill currency."},"externalVendorBillId":{"type":"string","description":"The identifier this bill has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this bill is from. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this bill is from."},"entityId":{"type":"string","description":"The legal entity this bill is posted under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this bill is posted under."},"purchaseOrderId":{"type":"string","description":"The purchase order this bill is matched to. See id on GET accounting/purchase-orders/:id. The match is line-level, so it is absent when the bill is matched to no purchase order."},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order."},"externalPurchaseOrderNumber":{"type":"string","description":"The external reference of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order, or when that purchase order has no external reference."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line item number."},"description":{"type":"string","description":"A description of the line item, typically copied from the vendor's invoice."},"lineType":{"type":"string","description":"The type of line item. Values include 'expense' and 'prepaidExpense'."},"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, in the bill currency."},"currency":{"type":"string","description":"The currency for the line. It always matches the bill currency. Format ISO 4217, for example 'USD'."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the bill currency."},"vatAmount":{"type":"string","format":"decimal","description":"The computed VAT amount on the line, in the bill currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a percentage. 21 means 21%, not 0.21."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'."},"externalVendorBillItemId":{"type":"string","description":"The identifier this line has in the upstream system that produced it."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted bill reads 'notStarted' until the bill posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in the bill currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaidExpense'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The bill line items, in their order on the bill. An empty array when the bill has none."}},"additionalProperties":false,"required":["id","vendorBillNumber","billNumber","billDate","dueDate","currency","status","lastModifiedDate"]},"description":"The vendor bills that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more bills remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchVendorBillInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the vendor bill with this identifier."},"vendorBillNumber":{"type":"string","description":"Limits results to the vendor bill with this number."},"billNumber":{"type":"string","description":"Limits results to bills with this vendor-issued invoice number. It is not unique, so this can match several bills."},"vendorId":{"type":"string","description":"Limits results to bills from this vendor. See id on GET accounting/vendors/:id."},"entityId":{"type":"string","description":"Limits results to bills posted under this legal entity. See id on GET base/entities."},"vendorName":{"type":"string","description":"Limits results to bills from a vendor with this name."},"entityName":{"type":"string","description":"Limits results to bills posted under a legal entity with this name."},"status":{"type":"string","description":"Limits results to bills in this approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'. Any other value matches no bill."},"paymentStatus":{"type":"string","description":"Limits results to bills in this payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'. Any other value matches no bill."},"externalVendorBillId":{"type":"string","description":"Limits results to bills with this upstream identifier. It is not unique, so this can match several bills."},"purchaseOrderId":{"type":"string","description":"Limits results to bills matched to this purchase order. See id on GET accounting/purchase-orders/:id. The match is line-level."},"purchaseOrderNumber":{"type":"string","description":"Limits results to bills matched to the purchase order with this number. The match is line-level."},"externalPurchaseOrderNumber":{"type":"string","description":"Limits results to bills matched to a purchase order with this external reference. It is not unique, and the match is line-level."}},"additionalProperties":false,"description":"The filters to apply. A vendor bill must match every filter you send. Omit to return all vendor bills.","examples":[{"billNumber":"INV-88213"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of vendor bills per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"deletePayrollDetailOutput":{"type":"object","properties":{},"additionalProperties":false},"createPurchaseOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase order.","examples":["9c4e1b70-8d25-4a63-b19f-5e7c02da3846"]}},"additionalProperties":false,"required":["id"]},"createPurchaseOrderInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity that owns the order. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"vendorId":{"type":"string","description":"The vendor the order is placed with. See id on GET accounting/vendors/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'. Governs every line amount.","examples":["USD"]},"description":{"type":"string","description":"The description of the order, shown to the vendor.","examples":["Q4 office supplies"]},"internalDescription":{"type":"string","description":"An internal description of the order, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo printed on vendor-facing documents."},"externalPONumber":{"type":"string","description":"The reference number this order has in the upstream system."},"paymentTerms":{"type":"string","description":"The payment-terms code agreed with the vendor, for example 'net30'."},"startDate":{"type":"string","format":"date","description":"The date the order starts. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The date the order ends. Use format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are required by. Use format YYYY-MM-DD.","examples":["2026-10-15"]},"requestedById":{"type":"string","description":"The employee who requested the order. There is no endpoint for it."},"lines":{"type":"array","items":{"type":"object","properties":{"isItem":{"type":"boolean","description":"Whether this is an item line. True for an item line, priced by quantity times price. False for an expense line, priced by editableAmount."},"description":{"type":"string","description":"A description of what is being ordered."},"itemId":{"type":"string","description":"The item being ordered. Expected on an item line."},"accountId":{"type":"string","description":"The ledger account the line is booked to. See id on GET accounting/accounts/:id. Expected on an expense line."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. Expected on an item line."},"departmentId":{"type":"string","description":"The department the cost is allocated to. See id on GET people/departments/:id."},"quantity":{"type":"string","format":"decimal","description":"The ordered quantity, as a decimal. Expected on an item line."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency, as a decimal. Expected on an item line."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, in the order currency, as a decimal. Expected on an expense line."},"startDate":{"type":"string","format":"date","description":"The date this line starts. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The date this line ends. Use format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["isItem"]},"description":"The lines this order places. At least one is required.","examples":[[{"isItem":false,"description":"Stationery","editableAmount":"450.00"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the already-uploaded file. There is no endpoint for it."}},"additionalProperties":false,"required":["fileName","fileId"]},"description":"Files to attach to the order. Each names an already-uploaded file by its id."}},"additionalProperties":false,"required":["entityId","vendorId","currency","lines"]},"markVendorDuplicateOutput":{"type":"object","properties":{"foldedCount":{"type":"number","description":"How many vendors were folded into the parent.","examples":[1]}},"additionalProperties":false,"required":["foldedCount"]},"markVendorDuplicateInput":{"type":"object","properties":{"duplicateVendorIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the vendors to mark as duplicates of the parent. At least one is required.","examples":[["9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95"]]}},"additionalProperties":false,"required":["duplicateVendorIds"]},"updateAdvancePaymentCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAdvancePaymentCategoryInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the category. Required — renaming is the primary purpose of an update call.","examples":["Standard Advance (renamed)"]},"allowManualPayment":{"type":"boolean","description":"Whether an employee may be paid this advance manually (outside the standard payment run). Omit to default to true.","examples":[true]},"status":{"type":"string","description":"Lifecycle status. Accepted values: 'active', 'inactive'. Omit to default to 'active'.","examples":["active"]}},"additionalProperties":false,"required":["name"]},"createBankTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bank transaction.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createBankTransactionInput":{"type":"object","properties":{"bankAccountId":{"type":"string","description":"The bank account the transaction belongs to. See id on GET banking/bank-accounts/:id.","examples":["9effa2ff-bc94-44bc-b706-a5f95f792407"]},"amount":{"type":"string","format":"decimal","description":"The transaction amount, as a decimal in the transaction currency. A negative amount is money leaving the account.","examples":["-1250.00"]},"currency":{"type":"string","description":"The currency of the transaction. Format ISO 4217, for example 'USD'. It governs the amount.","examples":["USD"]},"externalCreationDate":{"type":"string","format":"date","description":"The date the transaction was created in the source system. Use format YYYY-MM-DD.","examples":["2026-02-14"]},"externalTransactionId":{"type":"string","description":"The transaction's identifier in the system it was imported from. Must be unique across the tenant.","examples":["ACME-TXN-88213"]},"description":{"type":"string","description":"A human-readable description of the transaction.","examples":["Consulting, February"]},"externalDescription":{"type":"string","description":"The description exactly as the source system supplied it, before any normalization."},"payeeOrPayor":{"type":"string","description":"The name of the counterparty the money went to or came from.","examples":["Acme Consulting LLC"]},"externalId":{"type":"string","description":"Another identifier the source system has for this record, distinct from externalTransactionId and not unique."},"transactionPaymentMethod":{"type":"string","description":"How the payment was made. The values are 'ACH', 'WIRE' and 'Unknown'.","examples":["ACH"]},"notes":{"type":"string","description":"Free-form notes for the transaction."},"externalPaymentId":{"type":"string","description":"The identifier of the payment in the source system this transaction settles."}},"additionalProperties":false,"required":["bankAccountId","amount","currency","externalCreationDate","externalTransactionId"]},"getBankTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank transaction."},"bankTransactionNumber":{"type":"string","description":"The bank transaction number. Absent until one has been assigned."},"externalTransactionId":{"type":"string","description":"The identifier this transaction has in the bank or aggregator it was imported from. Unique across transactions."},"externalPaymentId":{"type":"string","description":"The end-to-end payment identifier supplied by the integration, where the bank provides one."},"endToEndId":{"type":"string","description":"A payment reference recovered from the external transaction data by the integration."},"externalCreationDate":{"type":"string","format":"date","description":"The date the transaction was created in the source bank, not the date it was imported. Format YYYY-MM-DD."},"description":{"type":"string","description":"The description recorded on the transaction."},"externalDescription":{"type":"string","description":"The description as the bank supplied it, unmodified."},"additionalInformation":{"type":"string","description":"Any additional detail the bank supplied with the transaction."},"payeeOrPayor":{"type":"string","description":"The name of the counterparty the money went to or came from."},"amount":{"type":"string","format":"decimal","description":"The transaction amount, as a decimal in the transaction currency. A negative amount is money leaving the account and a positive amount is money arriving."},"currency":{"type":"string","description":"The currency of the transaction. Format ISO 4217, for example 'USD'. It governs the amount."},"matchStatus":{"type":"string","description":"The reconciliation state of the transaction, computed from its matches. The states are 'unmatched', 'suggested', 'pending', 'matched', 'autoMatched' and 'needsAttention'."},"matchId":{"type":"string","description":"The unique identifier for the match this transaction belongs to. Absent when the transaction is unmatched. There is no endpoint for it."},"notes":{"type":"string","description":"Free-form notes recorded against the transaction."},"transactionPaymentMethod":{"type":"string","description":"How the payment was made, as reported by the integration. The values are 'ACH', 'WIRE' and 'Unknown'."},"bankAccountId":{"type":"string","description":"The bank account this transaction belongs to. See id on GET banking/bank-accounts/:id."},"accountName":{"type":"string","description":"The name of the linked chart-of-accounts account. Suffixed with '(Inactive)' when the account link is broken."},"sourceBankName":{"type":"string","description":"The name of the bank the account is held at."},"entityName":{"type":"string","description":"The name of the legal entity the owning bank account belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank transaction last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","externalTransactionId","externalCreationDate","lastModifiedDate"]},"bankTransactionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank transaction."},"bankTransactionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank transaction number. Absent until one has been assigned."},"externalTransactionId":{"type":"string","description":"The identifier this transaction has in the bank or aggregator it was imported from. Unique across transactions."},"externalPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end-to-end payment identifier supplied by the integration, where the bank provides one."},"endToEndId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A payment reference recovered from the external transaction data by the integration."},"externalCreationDate":{"type":"string","format":"date","description":"The date the transaction was created in the source bank, not the date it was imported. Format YYYY-MM-DD."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description recorded on the transaction."},"externalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description as the bank supplied it, unmodified."},"additionalInformation":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any additional detail the bank supplied with the transaction."},"payeeOrPayor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the counterparty the money went to or came from."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The transaction amount, as a decimal in the transaction currency. A negative amount is money leaving the account and a positive amount is money arriving."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the transaction. Format ISO 4217, for example 'USD'. It governs the amount."},"matchStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reconciliation state of the transaction, computed from its matches. The states are 'unmatched', 'suggested', 'pending', 'matched', 'autoMatched' and 'needsAttention'."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes recorded against the transaction."},"transactionPaymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the payment was made, as reported by the integration. The values are 'ACH', 'WIRE' and 'Unknown'."},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the linked chart-of-accounts account. Suffixed with '(Inactive)' when the account link is broken."},"sourceBankName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the bank the account is held at."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the owning bank account belongs to."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bank transaction last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteBankTransactionOutput":{"type":"object","properties":{},"additionalProperties":false},"deleteBankAccountOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankTransactionOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankTransactionInput":{"type":"object","properties":{"externalCreationDate":{"type":"string","format":"date","description":"The new date the transaction was created in the source system. Use format YYYY-MM-DD. Omit to leave it unchanged.","examples":["2026-02-17"]}},"additionalProperties":false},"searchBankTransactionOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank transaction."},"bankTransactionNumber":{"type":"string","description":"The bank transaction number. Absent until one has been assigned."},"externalTransactionId":{"type":"string","description":"The identifier this transaction has in the bank or aggregator it was imported from. Unique across transactions."},"externalPaymentId":{"type":"string","description":"The end-to-end payment identifier supplied by the integration, where the bank provides one."},"endToEndId":{"type":"string","description":"A payment reference recovered from the external transaction data by the integration."},"externalCreationDate":{"type":"string","format":"date","description":"The date the transaction was created in the source bank, not the date it was imported. Format YYYY-MM-DD."},"description":{"type":"string","description":"The description recorded on the transaction."},"externalDescription":{"type":"string","description":"The description as the bank supplied it, unmodified."},"additionalInformation":{"type":"string","description":"Any additional detail the bank supplied with the transaction."},"payeeOrPayor":{"type":"string","description":"The name of the counterparty the money went to or came from."},"amount":{"type":"string","format":"decimal","description":"The transaction amount, as a decimal in the transaction currency. A negative amount is money leaving the account and a positive amount is money arriving."},"currency":{"type":"string","description":"The currency of the transaction. Format ISO 4217, for example 'USD'. It governs the amount."},"matchStatus":{"type":"string","description":"The reconciliation state of the transaction, computed from its matches. The states are 'unmatched', 'suggested', 'pending', 'matched', 'autoMatched' and 'needsAttention'."},"matchId":{"type":"string","description":"The unique identifier for the match this transaction belongs to. Absent when the transaction is unmatched. There is no endpoint for it."},"notes":{"type":"string","description":"Free-form notes recorded against the transaction."},"transactionPaymentMethod":{"type":"string","description":"How the payment was made, as reported by the integration. The values are 'ACH', 'WIRE' and 'Unknown'."},"bankAccountId":{"type":"string","description":"The bank account this transaction belongs to. See id on GET banking/bank-accounts/:id."},"accountName":{"type":"string","description":"The name of the linked chart-of-accounts account. Suffixed with '(Inactive)' when the account link is broken."},"sourceBankName":{"type":"string","description":"The name of the bank the account is held at."},"entityName":{"type":"string","description":"The name of the legal entity the owning bank account belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank transaction last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","externalTransactionId","externalCreationDate","lastModifiedDate"]},"description":"The bank transactions on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchBankTransactionInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the bank transaction with this identifier."},"bankTransactionNumber":{"type":"string","description":"Limits results to the bank transaction with this number. The match is exact."},"externalTransactionId":{"type":"string","description":"Limits results to the transaction with this external identifier. The match is exact."},"externalPaymentId":{"type":"string","description":"Limits results to transactions with this end-to-end payment identifier. The match is exact."},"bankAccountId":{"type":"string","description":"Limits results to transactions on this bank account. See id on GET banking/bank-accounts/:id."},"entityId":{"type":"string","description":"Limits results to transactions whose bank account belongs to this legal entity. See id on GET base/entities."},"currency":{"type":"string","description":"Limits results to transactions in this currency. Format ISO 4217, for example 'USD'."},"matchStatus":{"type":"string","description":"Limits results to transactions in this reconciliation state. The states are 'unmatched', 'suggested', 'pending', 'matched', 'autoMatched' and 'needsAttention'. Any other value matches nothing."}},"additionalProperties":false,"description":"The filters to apply. A bank transaction must match every filter you send. Omit to return all bank transactions.","examples":[{"matchStatus":"unmatched"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of bank transactions per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchBankRuleOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank rule."},"bankRuleNumber":{"type":"string","description":"The bank rule number. Example: 'BR-000014'."},"rule":{"type":"string","description":"The name of the bank rule. Unique within the tenant."},"action":{"type":"string","description":"What the rule creates for each bank transaction that meets its criteria. Possible values: 'createBankEntry' (a bank entry), 'createCreditCardEntry' (a credit card entry)."},"status":{"type":"string","description":"The status of the rule. Possible values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run), 'draft' (a rule proposed by the Bank Rules Advisor, which does not run until it is activated)."},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first."},"description":{"type":"string","description":"A description of the rule."},"externalId":{"type":"string","description":"The bank rule's identifier in an external system, if provided."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank rule last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the criterion."},"criteria":{"type":"string","description":"The bank transaction field this criterion tests. Possible values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty)."},"operator":{"type":"string","description":"How the field is compared with value. When criteria is 'amount', it is 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', it is 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'."},"logicalOperator":{"type":"string","description":"How this criterion combines with the next one. Possible values: 'and', 'or'. When absent, 'and' applies. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Not used when the rule has criteria groups."},"value":{"type":"string","description":"The value the field is compared with. A number when criteria is 'amount', and text otherwise."},"groupKey":{"type":"string","description":"The key of the criteria group this criterion belongs to. See key on criteriaGroups. Absent when the rule has no criteria groups."}},"additionalProperties":false,"required":["id","criteria","operator","value"]},"description":"The conditions a bank transaction must meet, in the order they are evaluated. Rules created or updated through the API always have at least one."},"criteriaGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The group's identifier, referenced by groupKey on criteria and by parentKey on child groups."},"parentKey":{"type":"string","description":"The key of the parent group. Absent on the root group."},"logicalOperator":{"type":"string","description":"How the group combines its criteria and child groups. Possible values: 'and', 'or'."}},"additionalProperties":false,"required":["key","logicalOperator"]},"description":"The nested AND/OR groups of the rule's criteria. Empty when the rule combines its criteria with logicalOperator on each criterion. When present, exactly one group has no parentKey and is the root."},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account mapping."},"bankAccountId":{"type":"string","description":"The unique identifier for the bank account. See id on GET banking/bank-accounts/:id."},"accountName":{"type":"string","description":"The name of the bank account."}},"additionalProperties":false,"required":["id","bankAccountId"]},"description":"The bank accounts or credit card accounts this rule applies to. Rules created or updated through the API always have at least one. They all belong to the same legal entity, and are all bank accounts or all credit card accounts."},"actionObject":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the action object."},"accountId":{"type":"string","description":"The account each bank entry or credit card entry posts to. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name given to each bank entry or credit card entry."},"description":{"type":"string","description":"The description set on each bank entry or credit card entry and on its line."},"billableExpense":{"type":"string","description":"Marks the line of each credit card entry as a billable expense when 'yes'. Possible values: 'yes', 'no'."},"businessUnitId":{"type":"string","description":"The business unit set on each bank entry or credit card entry."},"departmentId":{"type":"string","description":"The department set on each bank entry or credit card entry."},"customerId":{"type":"string","description":"The customer set on each credit card entry. Not applied to bank entries. See id on GET accounting/customers/:id."},"vendorId":{"type":"string","description":"The vendor saved on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id."},"intercompanyPartnerId":{"type":"string","description":"The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account. No endpoint returns intercompany partners."},"valueAllocationTags":{"type":"array","items":{"type":"string"},"description":"The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry."}},"additionalProperties":false,"required":["id"],"description":"The values for the bank entry or credit card entry the rule creates for each bank transaction that meets its criteria. Absent when the rule has no action object, and such a rule is skipped when bank rules run."}},"additionalProperties":false,"required":["id","rule","action","status","priority","lastModifiedDate","criteria","criteriaGroups","accounts"]},"description":"The bank rules on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7","bankRuleNumber":"BR-000014","rule":"Stripe payouts","action":"createBankEntry","status":"active","priority":10,"lastModifiedDate":"2026-08-27T09:15:22.000Z","criteria":[],"criteriaGroups":[],"accounts":[]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchBankRuleInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the bank rule with this identifier. The match is exact."},"rule":{"type":"string","description":"Limits results to the bank rule with this name. The match is exact."},"action":{"type":"string","description":"Limits results to bank rules with this action. Accepted values: 'createBankEntry', 'createCreditCardEntry'. Any other value matches nothing."},"status":{"type":"string","description":"Limits results to bank rules with this status. Accepted values: 'active', 'inactive', 'draft'. Any other value matches nothing."}},"additionalProperties":false,"description":"The filters to apply. A bank rule must match every filter sent. Omit to return all bank rules.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of bank rules per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":25}]}},"additionalProperties":false},"matchBankTransactionsOutput":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"matchId":{"type":"string","description":"The unique identifier for the match."},"status":{"type":"string","description":"The status of the match. Possible values: 'matched', 'pending' (a document has no posted journal entry line yet)."},"bankTransactionIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the bank transactions in this match."}},"additionalProperties":false,"required":["matchId","status","bankTransactionIds"]},"description":"The matches created. Usually one. A fund transfer has one for each leg sent.","examples":[[{"matchId":"e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12","status":"matched","bankTransactionIds":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]}]]},"matchedBankTransactionIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for all the bank transactions matched, in the order sent, with repeats removed.","examples":[["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]]},"matchedDocuments":{"type":"array","items":{"type":"object","properties":{"sfdType":{"type":"string","description":"The type of document, as sent."},"sfdId":{"type":"string","description":"The unique identifier for the document, as sent."},"amount":{"type":"string","description":"The amount this document contributed to the match, as a decimal in the bank transaction currency."},"currency":{"type":"string","description":"The currency of amount. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["sfdType","sfdId","amount","currency"]},"description":"The documents matched, with the amount each one contributed. A fund transfer has one item for each leg.","examples":[[{"sfdType":"bankEntryNew","sfdId":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6","amount":"1200.00","currency":"USD"}]]}},"additionalProperties":false,"required":["matches","matchedBankTransactionIds","matchedDocuments"]},"matchBankTransactionsInput":{"type":"object","properties":{"bankTransactionIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the bank transactions to match. At least one is required. All of them must belong to the same bank account and legal entity, unless the only document is a fund transfer. A repeated identifier is counted once.","examples":[["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]]},"documents":{"type":"array","items":{"type":"object","properties":{"sfdType":{"enum":["outboundPayment","customerPayment","manualJournalEntry","bankEntryNew","creditCardEntry","fundTransfer","payroll"],"description":"The type of document. Accepted values: 'outboundPayment' (an outbound payment), 'customerPayment' (a customer payment), 'manualJournalEntry' (a manual journal entry), 'bankEntryNew' (a bank entry), 'creditCardEntry' (a credit card entry), 'fundTransfer' (a fund transfer), 'payroll' (a payroll detail)."},"sfdId":{"type":"string","description":"The unique identifier for the document, of the type in sfdType. For a bank entry, for example, see id on GET banking/bank-entries/:id."},"journalEntryLineId":{"type":"string","description":"The unique identifier for one journal entry line of the document, to match that line only. Omit to match every line of the document that posts to the bank account's linked chart-of-accounts account. Not used for a fund transfer."}},"additionalProperties":false,"required":["sfdType","sfdId"]},"description":"The documents to match the bank transactions with. At least one is required, and a fund transfer must be the only document.","examples":[[{"sfdType":"bankEntryNew","sfdId":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"}]]}},"additionalProperties":false,"required":["bankTransactionIds","documents"]},"unmatchBankTransactionOutput":{"type":"object","properties":{},"additionalProperties":false},"unmatchBankTransactionInput":{"type":"object","properties":{},"additionalProperties":false},"bankRulesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank rule."},"bankRuleNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank rule number. Example: 'BR-000014'."},"rule":{"type":"string","description":"The name of the bank rule. Unique within the tenant."},"action":{"type":"string","description":"What the rule creates for each bank transaction that meets its criteria. Possible values: 'createBankEntry' (a bank entry), 'createCreditCardEntry' (a credit card entry)."},"status":{"type":"string","description":"The status of the rule. Possible values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run), 'draft' (a rule proposed by the Bank Rules Advisor, which does not run until it is activated)."},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the rule."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank rule last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateBankRuleOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankRuleInput":{"type":"object","properties":{"rule":{"type":"string","description":"The name of the bank rule. Must be unique within the tenant."},"action":{"enum":["createBankEntry","createCreditCardEntry","createFundTransfer"],"description":"New action. Only these three are implemented. Omit to leave unchanged."},"status":{"enum":["active","inactive"],"description":"The status of the rule. Accepted values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run). Set to 'inactive' to stop a rule running without deleting it.","examples":["inactive"]},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first.","examples":[20]},"description":{"type":"string","description":"A description of the rule."},"bankAccountIds":{"type":"array","items":{"type":"string"},"description":"The bank accounts or credit card accounts this rule applies to. Replaces the whole current list when sent. At least one is required. They must all belong to the same legal entity, and must be all bank accounts or all credit card accounts, not a mix. See id on GET banking/bank-accounts/:id."},"criteria":{"type":"array","items":{"type":"object","properties":{"criteria":{"enum":["amount","description","payeePayor"],"description":"The bank transaction field this criterion tests. Accepted values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty)."},"operator":{"type":"string","description":"How the field is compared with value. When criteria is 'amount', use 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', use 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'."},"logicalOperator":{"enum":["and","or"],"description":"How this criterion combines with the next one. Accepted values: 'and', 'or'. Defaults to 'and'. Ignored on the last criterion. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Ignored when criteriaGroups is sent."},"value":{"type":"string","description":"The value the field is compared with. Cannot be empty. When criteria is 'amount', send a number, for example '-250.00'. Otherwise, send text."},"groupKey":{"type":"string","description":"The key of the criteria group this criterion belongs to. See key on criteriaGroups. Required when criteriaGroups is sent, and left out otherwise."}},"additionalProperties":false,"required":["criteria","operator","value"]},"description":"The conditions a bank transaction must meet. Replaces the whole current list when sent, so a criterion left out is deleted. At least one is required."},"criteriaGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"A key you choose for the group, unique within this request. Criteria refer to it in groupKey and child groups in parentKey."},"parentKey":{"type":"string","description":"The key of the parent group. Left out for the root group."},"logicalOperator":{"enum":["and","or"],"description":"How the group combines its criteria and child groups. Accepted values: 'and', 'or'."}},"additionalProperties":false,"required":["key","logicalOperator"]},"description":"Optional nested AND/OR groups for the criteria. When sent, criteria must be sent too, and both replace the rule's current criteria and groups. When sent, exactly one group has no parentKey and is the root, every criterion names its group in groupKey, and each group combines its criteria and child groups with its own logicalOperator. For example, (A and B) or C is a root 'or' group holding C and a child 'and' group holding A and B. When left out, criteria are combined using logicalOperator on each criterion."},"actionObject":{"type":"object","properties":{"accountId":{"type":"string","description":"The account each bank entry or credit card entry posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name given to each bank entry or credit card entry."},"description":{"type":"string","description":"The description set on each bank entry or credit card entry and on its line."},"billableExpense":{"enum":["yes","no"],"description":"Marks the line of each credit card entry as a billable expense when 'yes'. Accepted values: 'yes', 'no'. Applies only to rules with the action 'createCreditCardEntry'."},"businessUnitId":{"type":"string","description":"The business unit set on each bank entry or credit card entry."},"departmentId":{"type":"string","description":"The department set on each bank entry or credit card entry."},"customerId":{"type":"string","description":"The customer set on each credit card entry. Use only when billableExpense is 'yes'. Not applied to bank entries. See id on GET accounting/customers/:id."},"vendorId":{"type":"string","description":"A vendor to save on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id."},"intercompanyPartnerId":{"type":"string","description":"The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account, and ignored otherwise. No endpoint returns intercompany partners."},"valueAllocationTags":{"type":"array","items":{"type":"string"},"description":"The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry."},"fromAccountId":{"type":"string","description":"[fk: AccountApi.accounts.id] createFundTransfer only. Source cash account of the transfer, given as its id (a UUID)."},"toAccountId":{"type":"string","description":"[fk: AccountApi.accounts.id] createFundTransfer only. Destination cash account of the transfer, given as its id (a UUID). Required for createFundTransfer. Must differ from fromAccountId."},"fromLineDescription":{"type":"string","description":"createFundTransfer only. Description stamped on the transfer's From line."},"toLineDescription":{"type":"string","description":"createFundTransfer only. Description stamped on the transfer's To line."},"intercompanyProcessId":{"type":"string","description":"[fk: IntercompanyProcessApi.intercompanyProcesses.id] createFundTransfer only, given as its id (a UUID). Required when the two accounts belong to different legal entities."},"transferReason":{"enum":["funding","repayment"],"description":"createFundTransfer only. Required when the two accounts belong to different legal entities."},"intercompanyTransactionalCurrency":{"type":"string","description":"createFundTransfer only. Currency the intercompany balance is carried in. Required when the two accounts belong to different legal entities."},"fromFeeToleranceType":{"enum":["percentage","fixedAmount"],"description":"createFundTransfer only. Whether the sending-side bank fee tolerance is read as a percentage or a fixed amount."},"fromFeeToleranceValue":{"type":"string","format":"decimal","description":"createFundTransfer only. Sending-side tolerance; a shortfall up to this much is booked as a bank fee, beyond it the two transactions are not paired. Left unset, the amounts must match exactly."},"toFeeToleranceType":{"enum":["percentage","fixedAmount"],"description":"createFundTransfer only. Whether the receiving-side bank fee tolerance is read as a percentage or a fixed amount."},"toFeeToleranceValue":{"type":"string","format":"decimal","description":"createFundTransfer only. Receiving-side tolerance; a shortfall up to this much is booked as a bank fee, beyond it the two transactions are not paired. Left unset, the amounts must match exactly."}},"additionalProperties":false,"description":"The values for the bank entry or credit card entry the rule creates. Only the fields you send are changed. A field left out keeps its current value."}},"additionalProperties":false},"runBankRulesOutput":{"type":"object","properties":{"matchedCount":{"type":"number","description":"The number of bank transactions this run matched, across all rules.","examples":[2]},"matchedBankTransactionIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the bank transactions this run matched. Lists at most 500, so use matchedCount for the total.","examples":[["6b87606e-ab22-479b-8b0b-3d79b1c0c611","2683e61d-f4ed-45bf-a3d8-63d81d138edd"]]},"skippedBankRules":{"type":"array","items":{"type":"object","properties":{"bankRuleId":{"type":"string","description":"The unique identifier for the skipped bank rule."},"reason":{"type":"string","description":"Why the rule was skipped. Possible values: 'NO_ACCOUNTS_MAPPED' (the rule applies to no bank accounts), 'RULE_INCOMPLETE' (the rule has no criteria, or does not have exactly one action object), 'RUN_FAILED' (the rule failed while running, for example because every bank account it applies to is deleted or not ready), 'RULE_NOT_ACTIVE' or 'NOT_FOUND' (the rule was deactivated or deleted while the run was in progress)."},"message":{"type":"string","description":"A readable explanation of why the rule was skipped."}},"additionalProperties":false,"required":["bankRuleId","reason","message"]},"description":"The active rules that could not run. The other rules still ran.","examples":[[{"bankRuleId":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7","reason":"RULE_INCOMPLETE","message":"Bank rule BR-00042 cannot be run because it is missing criteria."}]]}},"additionalProperties":false,"required":["matchedCount","matchedBankTransactionIds","skippedBankRules"]},"runBankRulesInput":{"type":"object","properties":{},"additionalProperties":false},"createBankRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bank rule.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]}},"additionalProperties":false,"required":["id"]},"createBankRuleInput":{"type":"object","properties":{"rule":{"type":"string","description":"The name of the bank rule. Must be unique within the tenant.","examples":["Stripe payouts"]},"action":{"enum":["createBankEntry","createCreditCardEntry","createFundTransfer"],"description":"What the rule does when a transaction matches. Only these three are implemented; autoMatch is rejected with RULE_ACTION_NOT_SUPPORTED.","examples":["createBankEntry"]},"status":{"enum":["active","inactive"],"description":"The status of the rule. Accepted values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run).","examples":["active"]},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first. A bank transaction matched by one rule is no longer available to the rules after it.","examples":[10]},"description":{"type":"string","description":"A description of the rule.","examples":["Book Stripe payouts to the clearing account"]},"bankAccountIds":{"type":"array","items":{"type":"string"},"description":"The bank accounts or credit card accounts this rule applies to. At least one is required. They must all belong to the same legal entity, and must be all bank accounts or all credit card accounts, not a mix. See id on GET banking/bank-accounts/:id.","examples":[["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]]},"criteria":{"type":"array","items":{"type":"object","properties":{"criteria":{"enum":["amount","description","payeePayor"],"description":"The bank transaction field this criterion tests. Accepted values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty)."},"operator":{"type":"string","description":"How the field is compared with value. When criteria is 'amount', use 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', use 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'."},"logicalOperator":{"enum":["and","or"],"description":"How this criterion combines with the next one. Accepted values: 'and', 'or'. Defaults to 'and'. Ignored on the last criterion. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Ignored when criteriaGroups is sent."},"value":{"type":"string","description":"The value the field is compared with. Cannot be empty. When criteria is 'amount', send a number, for example '-250.00'. Otherwise, send text."},"groupKey":{"type":"string","description":"The key of the criteria group this criterion belongs to. See key on criteriaGroups. Required when criteriaGroups is sent, and left out otherwise."}},"additionalProperties":false,"required":["criteria","operator","value"]},"description":"The conditions a bank transaction must meet for the rule to act on it. At least one is required. They are evaluated in the order given.","examples":[[{"criteria":"description","operator":"containsCaseInsensitive","logicalOperator":"and","value":"STRIPE"}]]},"criteriaGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"A key you choose for the group, unique within this request. Criteria refer to it in groupKey and child groups in parentKey."},"parentKey":{"type":"string","description":"The key of the parent group. Left out for the root group."},"logicalOperator":{"enum":["and","or"],"description":"How the group combines its criteria and child groups. Accepted values: 'and', 'or'."}},"additionalProperties":false,"required":["key","logicalOperator"]},"description":"Optional nested AND/OR groups for the criteria. When sent, exactly one group has no parentKey and is the root, every criterion names its group in groupKey, and each group combines its criteria and child groups with its own logicalOperator. For example, (A and B) or C is a root 'or' group holding C and a child 'and' group holding A and B. When left out, criteria are combined using logicalOperator on each criterion."},"actionObject":{"type":"object","properties":{"accountId":{"type":"string","description":"The account each bank entry or credit card entry posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name given to each bank entry or credit card entry."},"description":{"type":"string","description":"The description set on each bank entry or credit card entry and on its line."},"billableExpense":{"enum":["yes","no"],"description":"Marks the line of each credit card entry as a billable expense when 'yes'. Accepted values: 'yes', 'no'. Applies only to rules with the action 'createCreditCardEntry'."},"businessUnitId":{"type":"string","description":"The business unit set on each bank entry or credit card entry."},"departmentId":{"type":"string","description":"The department set on each bank entry or credit card entry."},"customerId":{"type":"string","description":"The customer set on each credit card entry. Use only when billableExpense is 'yes'. Not applied to bank entries. See id on GET accounting/customers/:id."},"vendorId":{"type":"string","description":"A vendor to save on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id."},"intercompanyPartnerId":{"type":"string","description":"The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account, and ignored otherwise. No endpoint returns intercompany partners."},"valueAllocationTags":{"type":"array","items":{"type":"string"},"description":"The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry."},"fromAccountId":{"type":"string","description":"[fk: AccountApi.accounts.id] createFundTransfer only. Source cash account of the transfer, given as its id (a UUID). Required for createFundTransfer."},"toAccountId":{"type":"string","description":"[fk: AccountApi.accounts.id] createFundTransfer only. Destination cash account of the transfer, given as its id (a UUID). Required for createFundTransfer, and must differ from fromAccountId."},"fromLineDescription":{"type":"string","description":"createFundTransfer only. Description stamped on the transfer's From line."},"toLineDescription":{"type":"string","description":"createFundTransfer only. Description stamped on the transfer's To line."},"intercompanyProcessId":{"type":"string","description":"[fk: IntercompanyProcessApi.intercompanyProcesses.id] createFundTransfer only, given as its id (a UUID). Required when the two accounts belong to different legal entities."},"transferReason":{"enum":["funding","repayment"],"description":"createFundTransfer only. Required when the two accounts belong to different legal entities."},"intercompanyTransactionalCurrency":{"type":"string","description":"createFundTransfer only. Currency the intercompany balance is carried in. Required when the two accounts belong to different legal entities."},"fromFeeToleranceType":{"enum":["percentage","fixedAmount"],"description":"createFundTransfer only. Whether the sending-side bank fee tolerance is read as a percentage or a fixed amount."},"fromFeeToleranceValue":{"type":"string","format":"decimal","description":"createFundTransfer only. Sending-side tolerance; a shortfall up to this much is booked as a bank fee, beyond it the two transactions are not paired. Left unset, the amounts must match exactly."},"toFeeToleranceType":{"enum":["percentage","fixedAmount"],"description":"createFundTransfer only. Whether the receiving-side bank fee tolerance is read as a percentage or a fixed amount."},"toFeeToleranceValue":{"type":"string","format":"decimal","description":"createFundTransfer only. Receiving-side tolerance; a shortfall up to this much is booked as a bank fee, beyond it the two transactions are not paired. Left unset, the amounts must match exactly."}},"additionalProperties":false,"description":"The values for the bank entry or credit card entry the rule creates for each bank transaction that meets its criteria. All of its fields are optional.","examples":[{"accountId":"6d1e4b27-8a90-4c31-b5f2-7e8a9c0d1b23","name":"Stripe payout","description":"Auto-created by rule"}]}},"additionalProperties":false,"required":["rule","action","status","priority","bankAccountIds","criteria","actionObject"]},"getBankRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank rule.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"bankRuleNumber":{"type":"string","description":"The bank rule number. Example: 'BR-000014'.","examples":["BR-000014"]},"rule":{"type":"string","description":"The name of the bank rule. Unique within the tenant.","examples":["Stripe payouts"]},"action":{"type":"string","description":"What the rule creates for each bank transaction that meets its criteria. Possible values: 'createBankEntry' (a bank entry), 'createCreditCardEntry' (a credit card entry).","examples":["createBankEntry"]},"status":{"type":"string","description":"The status of the rule. Possible values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run), 'draft' (a rule proposed by the Bank Rules Advisor, which does not run until it is activated).","examples":["active"]},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first.","examples":[10]},"description":{"type":"string","description":"A description of the rule."},"externalId":{"type":"string","description":"The bank rule's identifier in an external system, if provided."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank rule last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-27T09:15:22.000Z"]},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the criterion."},"criteria":{"type":"string","description":"The bank transaction field this criterion tests. Possible values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty)."},"operator":{"type":"string","description":"How the field is compared with value. When criteria is 'amount', it is 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', it is 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'."},"logicalOperator":{"type":"string","description":"How this criterion combines with the next one. Possible values: 'and', 'or'. When absent, 'and' applies. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Not used when the rule has criteria groups."},"value":{"type":"string","description":"The value the field is compared with. A number when criteria is 'amount', and text otherwise."},"groupKey":{"type":"string","description":"The key of the criteria group this criterion belongs to. See key on criteriaGroups. Absent when the rule has no criteria groups."}},"additionalProperties":false,"required":["id","criteria","operator","value"]},"description":"The conditions a bank transaction must meet, in the order they are evaluated. Rules created or updated through the API always have at least one.","examples":[[{"id":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84","criteria":"description","operator":"containsCaseInsensitive","logicalOperator":"and","value":"STRIPE"}]]},"criteriaGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The group's identifier, referenced by groupKey on criteria and by parentKey on child groups."},"parentKey":{"type":"string","description":"The key of the parent group. Absent on the root group."},"logicalOperator":{"type":"string","description":"How the group combines its criteria and child groups. Possible values: 'and', 'or'."}},"additionalProperties":false,"required":["key","logicalOperator"]},"description":"The nested AND/OR groups of the rule's criteria. Empty when the rule combines its criteria with logicalOperator on each criterion. When present, exactly one group has no parentKey and is the root.","examples":[[]]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account mapping."},"bankAccountId":{"type":"string","description":"The unique identifier for the bank account. See id on GET banking/bank-accounts/:id."},"accountName":{"type":"string","description":"The name of the bank account."}},"additionalProperties":false,"required":["id","bankAccountId"]},"description":"The bank accounts or credit card accounts this rule applies to. Rules created or updated through the API always have at least one. They all belong to the same legal entity, and are all bank accounts or all credit card accounts.","examples":[[{"id":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6","bankAccountId":"8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e","accountName":"Operating account"}]]},"actionObject":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the action object."},"accountId":{"type":"string","description":"The account each bank entry or credit card entry posts to. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name given to each bank entry or credit card entry."},"description":{"type":"string","description":"The description set on each bank entry or credit card entry and on its line."},"billableExpense":{"type":"string","description":"Marks the line of each credit card entry as a billable expense when 'yes'. Possible values: 'yes', 'no'."},"businessUnitId":{"type":"string","description":"The business unit set on each bank entry or credit card entry."},"departmentId":{"type":"string","description":"The department set on each bank entry or credit card entry."},"customerId":{"type":"string","description":"The customer set on each credit card entry. Not applied to bank entries. See id on GET accounting/customers/:id."},"vendorId":{"type":"string","description":"The vendor saved on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id."},"intercompanyPartnerId":{"type":"string","description":"The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account. No endpoint returns intercompany partners."},"valueAllocationTags":{"type":"array","items":{"type":"string"},"description":"The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry."}},"additionalProperties":false,"required":["id"],"description":"The values for the bank entry or credit card entry the rule creates for each bank transaction that meets its criteria. Absent when the rule has no action object, and such a rule is skipped when bank rules run.","examples":[{"id":"e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12","accountId":"6d1e4b27-8a90-4c31-b5f2-7e8a9c0d1b23","name":"Stripe payout","description":"Auto-created by rule"}]}},"additionalProperties":false,"required":["id","rule","action","status","priority","lastModifiedDate","criteria","criteriaGroups","accounts"]},"deleteBankRuleOutput":{"type":"object","properties":{},"additionalProperties":false},"searchManualTaxableDocumentOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the manual taxable document (a UUID) — the public identifier of this record."},"type":{"type":"string","description":"Kind of document. One of 'outgoingInvoice', 'outgoingCredit', 'incomingInvoice', 'incomingCredit'. An outgoingInvoice is a customer-facing invoice whose incoming payment can be matched to a bank deposit."},"taxDocumentNumber":{"type":"string","description":"System-generated tax document number, unique per tenant and human-readable. Absent until one has been assigned."},"documentNumber":{"type":"string","description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or the number carried over from an external system. Distinct from taxDocumentNumber, which Everest assigns."},"title":{"type":"string","description":"Title of the document, as shown on the record."},"description":{"type":"string","description":"Free-text description of the document."},"invoiceDate":{"type":"string","format":"date","description":"Date the document was issued, as a calendar date (YYYY-MM-DD)."},"serviceDate":{"type":"string","format":"date","description":"Date the underlying service was provided, as a calendar date (YYYY-MM-DD). Drives the tax point where it differs from the invoice date."},"dueDate":{"type":"string","format":"date","description":"Date payment falls due, as a calendar date (YYYY-MM-DD). Absent when no due date has been set."},"currency":{"type":"string","description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR, GBP). It governs every amount on the record, on the header and on every line alike."},"paymentStatus":{"type":"string","description":"Settlement status of the document. One of 'paid', 'partiallyPaid', 'unpaid', 'noPaymentNeeded', 'voided', 'applied', 'unapplied', 'partiallyApplied', 'noApplicationNeeded'."},"paymentTerms":{"type":"string","description":"Payment terms recorded on the document, as free text (e.g. 'Net 30')."},"totalTaxAmount":{"type":"string","format":"decimal","description":"Sum of the tax amounts of every line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Sum of the total amounts of every line — the gross document total, in the document currency (see currency)."},"totalAllocatedAmount":{"type":"string","format":"decimal","description":"Amount already allocated to this document by payments or credits, in the document currency (see currency)."},"totalOpenAmount":{"type":"string","format":"decimal","description":"Remaining unallocated balance on this document, in the document currency (see currency). Greater than zero means the document is still open."},"hasAttachment":{"type":"boolean","description":"True when the document has at least one attachment. The attachments themselves are not published by this API; document delivery is a separate concern with its own permission."},"customerId":{"type":"string","description":"Id of the customer the document is issued to (a UUID). Set on customer-facing documents; absent on vendor or employee ones."},"customerName":{"type":"string","description":"Display name of the customer. Personal and counterparty data."},"customerNumber":{"type":"string","description":"System-generated customer number of the customer, unique per tenant."},"entityId":{"type":"string","description":"Id of the legal entity the document belongs to (a UUID)."},"entityName":{"type":"string","description":"Name of the legal entity the document belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the document record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Poll on this to sync incrementally rather than re-reading the whole collection."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the document line (a UUID)."},"lineNumber":{"type":"string","description":"System-generated line number within the document. Absent until one has been assigned."},"description":{"type":"string","description":"Free-text description of the line item."},"taxableBasis":{"type":"string","format":"decimal","description":"Basis amount the tax is calculated on, in the document currency (see currency)."},"taxAmount":{"type":"string","format":"decimal","description":"Tax charged on the line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Line total including tax, in the document currency (see currency)."}},"additionalProperties":false,"required":["id"]},"description":"Lines of the document, each carrying one taxable position. Empty on a document with no lines. All line amounts are in the document currency (see currency)."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"Matching manual taxable documents for this page, newest first. Empty when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as page.cursor for the next page; absent on the last page (mirrors the list/v1 data-set pagination.nextCursor)."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page (mirrors the list/v1 data-set pagination.hasMore)."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchManualTaxableDocumentInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Exact match on a document's id (a UUID). This is how a single known document is fetched."},"taxDocumentNumber":{"type":"string","description":"Exact match on the system-generated tax document number. In the body because a document number must not travel in a URL."},"documentNumber":{"type":"string","description":"Exact match on the source document number — the counterparty's own number, or one carried over from an external system. In the body on the same grounds as taxDocumentNumber."},"type":{"type":"array","items":{"type":"string"},"description":"Restrict to documents of any of these kinds. Allowed values: 'outgoingInvoice', 'outgoingCredit', 'incomingInvoice', 'incomingCredit'; an unrecognised value simply matches nothing. An empty array does not constrain."},"paymentStatus":{"type":"array","items":{"type":"string"},"description":"Restrict to documents in any of these settlement statuses. Allowed values: 'paid', 'partiallyPaid', 'unpaid', 'noPaymentNeeded', 'voided', 'applied', 'unapplied', 'partiallyApplied', 'noApplicationNeeded'; an unrecognised value simply matches nothing. An empty array does not constrain."},"currency":{"type":"array","items":{"type":"string"},"description":"Restrict to documents in any of these currencies, as 3-letter ISO 4217 codes. An empty array does not constrain."},"title":{"type":"string","description":"Case-insensitive SUBSTRING match on the document title. In the body because free text must never travel in a URL."},"description":{"type":"string","description":"Case-insensitive SUBSTRING match on the free-text document description. In the body because free text must never travel in a URL."},"paymentTerms":{"type":"string","description":"Case-insensitive SUBSTRING match on the payment terms recorded on the document. In the body because free text must never travel in a URL."},"customerId":{"type":"string","description":"Restrict to documents issued to this customer, given as the customer id (a UUID). An id that matches no customer yields an empty page, not an error."},"customerName":{"type":"string","description":"Case-insensitive SUBSTRING match on the customer's name. In the body precisely because a counterparty name must never travel in a URL."},"customerNumber":{"type":"string","description":"Exact match on the customer's system-generated customer number. In the body on the same grounds as customerName."},"entityId":{"type":"string","description":"Restrict to documents belonging to this legal entity, given as the entity id (a UUID). An id that matches no entity yields an empty page, not an error."},"entityName":{"type":"string","description":"Case-insensitive SUBSTRING match on the legal entity's name. In the body because it names internal organisational structure."},"invoiceDate":{"type":"object","properties":{"start":{"type":"string","description":"Earliest issue date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no lower bound."},"end":{"type":"string","description":"Latest issue date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict to documents issued in this date window. Both bounds are calendar dates (YYYY-MM-DD) and are INCLUSIVE; omit either side to leave it open-ended."},"serviceDate":{"type":"object","properties":{"start":{"type":"string","description":"Earliest service date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no lower bound."},"end":{"type":"string","description":"Latest service date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict to documents whose service date falls in this window. Both bounds are calendar dates (YYYY-MM-DD) and are INCLUSIVE; omit either side to leave it open-ended."},"dueDate":{"type":"object","properties":{"start":{"type":"string","description":"Earliest due date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no lower bound."},"end":{"type":"string","description":"Latest due date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict to documents falling due in this window. Both bounds are calendar dates (YYYY-MM-DD) and are INCLUSIVE; omit either side to leave it open-ended."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"Earliest change instant to include, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Inclusive. Omit for no lower bound."},"end":{"type":"string","description":"Latest change instant to include, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict to documents changed in this window — the incremental-sync filter. Both bounds are ISO 8601 UTC timestamps (YYYY-MM-DDTHH:mm:ss.sssZ) and are INCLUSIVE; omit either side to leave it open-ended."},"totalAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"Smallest gross total to include. Inclusive. Omit for no lower bound."},"max":{"type":"string","format":"decimal","description":"Largest gross total to include. Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict by gross document total, in each document's own currency (see the currency filter to pin one). Both bounds are INCLUSIVE; omit either side to leave it open-ended."},"totalOpenAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"Smallest open balance to include. Inclusive. Omit for no lower bound."},"max":{"type":"string","format":"decimal","description":"Largest open balance to include. Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict by remaining open balance, in each document's own currency. Set min to a value just above zero to select the documents still outstanding. Both bounds are INCLUSIVE; omit either side to leave it open-ended."}},"additionalProperties":false,"description":"Search filters, nested as one object so they map onto the POST body. All are optional and are ANDed; omitting every one of them matches all documents. Omit the whole object to do exactly that."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct manually."},"size":{"type":"number","description":"Maximum number of documents to return. Defaults to 50, capped at 200; the server may return fewer, but never more."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"getManualTaxableDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id of the manual taxable document (a UUID) — the public identifier used by this route."},"type":{"type":"string","description":"Kind of document. One of 'outgoingInvoice', 'outgoingCredit', 'incomingInvoice', 'incomingCredit'. An outgoingInvoice is a customer-facing invoice whose incoming payment can be matched to a bank deposit."},"taxDocumentNumber":{"type":"string","description":"System-generated tax document number, unique per tenant and human-readable. Absent until one has been assigned."},"documentNumber":{"type":"string","description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or the number carried over from an external system. Distinct from taxDocumentNumber, which Everest assigns."},"title":{"type":"string","description":"Title of the document, as shown on the record."},"description":{"type":"string","description":"Free-text description of the document."},"invoiceDate":{"type":"string","format":"date","description":"Date the document was issued, as a calendar date (YYYY-MM-DD)."},"serviceDate":{"type":"string","format":"date","description":"Date the underlying service was provided, as a calendar date (YYYY-MM-DD). Drives the tax point where it differs from the invoice date."},"dueDate":{"type":"string","format":"date","description":"Date payment falls due, as a calendar date (YYYY-MM-DD). Absent when no due date has been set."},"currency":{"type":"string","description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR, GBP). It governs every amount on the record, on the header and on every line alike."},"paymentStatus":{"type":"string","description":"Settlement status of the document. One of 'paid', 'partiallyPaid', 'unpaid', 'noPaymentNeeded', 'voided', 'applied', 'unapplied', 'partiallyApplied', 'noApplicationNeeded'."},"paymentTerms":{"type":"string","description":"Payment terms recorded on the document, as free text (e.g. 'Net 30')."},"totalTaxAmount":{"type":"string","format":"decimal","description":"Sum of the tax amounts of every line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Sum of the total amounts of every line — the gross document total, in the document currency (see currency)."},"totalAllocatedAmount":{"type":"string","format":"decimal","description":"Amount already allocated to this document by payments or credits, in the document currency (see currency)."},"totalOpenAmount":{"type":"string","format":"decimal","description":"Remaining unallocated balance on this document, in the document currency (see currency). Greater than zero means the document is still open — this is how an unmatched customer invoice is found."},"hasAttachment":{"type":"boolean","description":"True when the document has at least one attachment. The attachments themselves are not published by this API; document delivery is a separate concern with its own permission."},"customerId":{"type":"string","description":"Id of the customer the document is issued to (a UUID). Set on customer-facing documents; absent on vendor or employee ones."},"customerName":{"type":"string","description":"Display name of the customer. Personal and counterparty data — it is returned here but is not a filter on GET tax-documents/manual-taxable-documents, so it never travels in a URL."},"customerNumber":{"type":"string","description":"System-generated customer number of the customer, unique per tenant."},"entityId":{"type":"string","description":"Id of the legal entity the document belongs to (a UUID)."},"entityName":{"type":"string","description":"Name of the legal entity the document belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the document record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Poll on this to sync incrementally rather than re-reading the whole collection."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the document line (a UUID)."},"lineNumber":{"type":"string","description":"System-generated line number within the document. Absent until one has been assigned."},"description":{"type":"string","description":"Free-text description of the line item."},"taxableBasis":{"type":"string","format":"decimal","description":"Basis amount the tax is calculated on, in the document currency (see currency)."},"taxAmount":{"type":"string","format":"decimal","description":"Tax charged on the line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Line total including tax, in the document currency (see currency)."}},"additionalProperties":false,"required":["id"]},"description":"Lines of the document, each carrying one taxable position. Empty on a document with no lines. All line amounts are in the document currency (see currency)."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"manualTaxableDocumentsRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the document — the public identifier used by GET tax-documents/manual-taxable-documents/:id. Filter e.g. filter[id][in]=<id1>,<id2>."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Kind of document. One of 'outgoingInvoice', 'outgoingCredit', 'incomingInvoice', 'incomingCredit'. Filter target: filter[type][eq]=outgoingInvoice, which with filter[totalOpenAmount][gt]=0 selects the unmatched customer invoices."},"taxDocumentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated tax document number, unique per tenant and human-readable. Absent until one has been assigned. Returned but NOT filterable or orderable — it identifies a specific financial document, and a sorted page would disclose the numbers in issue order; match on it through POST tax-documents/manual-taxable-documents/search."},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or one carried over from an external system. Returned but NOT filterable or orderable, on the same grounds as taxDocumentNumber; match on it through POST tax-documents/manual-taxable-documents/search."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Title of the document. Returned but NOT filterable or orderable by design — free text must never travel in a URL, so match on it through POST tax-documents/manual-taxable-documents/search."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text description of the document. Returned but NOT filterable or orderable by design — free text must never travel in a URL; match on it through POST tax-documents/manual-taxable-documents/search."},"invoiceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the document was issued, as a calendar date (YYYY-MM-DD). Filter target: filter[invoiceDate][between]=2026-01-01,2026-03-31; bounds are inclusive."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the underlying service was provided, as a calendar date (YYYY-MM-DD). Drives the tax point where it differs from the invoice date. Filter target: filter[serviceDate][gte]=2026-01-01."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date payment falls due, as a calendar date (YYYY-MM-DD). Filter target: filter[dueDate][lt]=2026-01-01 selects what was already due by then."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR). It governs every amount on this row. Filter target: filter[currency][in]=USD,EUR."},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Settlement status of the document. One of 'paid', 'partiallyPaid', 'unpaid', 'noPaymentNeeded', 'voided', 'applied', 'unapplied', 'partiallyApplied', 'noApplicationNeeded'. Filter target: filter[paymentStatus][in]=unpaid,partiallyPaid."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Payment terms recorded on the document, as free text (e.g. 'Net 30'). Returned but NOT filterable or orderable by design — free text must never travel in a URL; match on it through POST tax-documents/manual-taxable-documents/search."},"hasAttachment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when the document has at least one attachment. The attachments themselves are not published by this API. Filter target: filter[hasAttachment][eq]=false finds documents still missing their supporting file."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the customer the document is issued to (a UUID). Filter target: filter[customerId][eq]=<customerId> — this is how a customer's documents are listed."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the customer. Returned but NOT filterable or orderable — a counterparty name must not travel in a URL, and a sorted page would disclose the names in order; match on it through POST tax-documents/manual-taxable-documents/search."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated customer number of the customer. Returned but NOT filterable or orderable, on the same grounds as customerName; match on it through POST tax-documents/manual-taxable-documents/search."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the legal entity the document belongs to (a UUID). Filter target: filter[entityId][eq]=<entityId>."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the legal entity the document belongs to. Returned but NOT filterable or orderable — it names internal organisational structure, which a sorted page would disclose in order; match on it through POST tax-documents/manual-taxable-documents/search."},"totalTaxAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Sum of the tax amounts of every line, in the document currency (see currency). Filter target: filter[totalTaxAmount][gt]=0."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Sum of the total amounts of every line — the gross document total, in the document currency (see currency). Filter target: filter[totalAmount][between]=100,5000."},"totalAllocatedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount already allocated to this document by payments or credits, in the document currency (see currency)."},"totalOpenAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Remaining unallocated balance on this document, in the document currency (see currency). Filter target: filter[totalOpenAmount][gt]=0 combined with filter[type][eq]=outgoingInvoice selects the open customer receivables."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Instant the document record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter with filter[lastModifiedDate][gte]= and sort with sort=lastModifiedDate for a complete incremental-sync cursor."}},"additionalProperties":false},"documentCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the document category."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The internal name of the category. Absent when none is set."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display label of the category. Documents filed under this category are named with it as a prefix. Absent when none is set."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A longer description of what belongs in this category. Absent when none is set."},"requestable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an employee may request a document of this category from HR, rather than the category only receiving uploads."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the category record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"LineAllowance":{"type":"object","properties":{"allowance":{"type":"string","format":"decimal","description":"Committed quantity per allowance term, in the catalog Allowance's unit of measure.","examples":["1000"]},"allowanceTerm":{"type":"string","description":"The period the allowance covers: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually` or `orderTerm`. Defaults to the product catalog's Allowance term.","examples":["monthly"]},"maximumRolloverLimit":{"type":"string","format":"decimal","description":"Cap on the quantity that may roll over. Accepted only when the catalog Allowance has rollover enabled, and defaults to its setting.","examples":["500"]},"overage":{"$ref":"#/components/schemas/LineOverage","description":"Discount and invoicing overrides for the line's overage. Omit it to take everything from the catalog Overage and its price-book entry."},"rolloverDuration":{"type":"string","format":"decimal","description":"How many allowance terms unused allowance rolls over for. Accepted only when the catalog Allowance has rollover enabled, and defaults to its setting.","examples":["2"]}},"additionalProperties":false,"required":["allowance"],"description":"The Allowance & Overage terms of a Commit with Overage line — required for that line type and rejected on any other. `allowance` is the committed quantity per allowance term. The remaining fields are overrides, mirroring what the Sales Order screen lets a user change: allowanceTerm (annually/semiAnnually/quarterly/biMonthly/monthly/orderTerm), and the rollover configuration (rolloverDuration in allowance terms, maximumRolloverLimit) — accepted only when the product's catalog Allowance has rollover enabled. Unit of measure, usage component and the rollover flag itself always come from the catalog and cannot be overridden here, exactly as on the screen. `overage` carries the overage discount and invoicing overrides."},"LineOverage":{"type":"object","properties":{"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off the overage price, in the order currency. Takes precedence over `discountPercentage` when both are sent; omit both to price the overage exactly as its price-book entry has it.","examples":["1.50"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off the overage price on a 0–100 scale, so `10` means ten percent. Used only when `discountAmount` is not given.","examples":["10"]},"invoiceTiming":{"type":"string","description":"Whether the overage invoices `advance` (at the start of its period) or `arrears` (after it). Defaults from the entity's active invoice policy for overage lines, then from the parent line.","examples":["arrears"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the overage invoices on: `anniversary`, `first`, `last` or `specific`. Defaults from the entity's active invoice policy for overage lines, then from the parent line.","examples":["anniversary"]}},"additionalProperties":false,"description":"Overage overrides for a Commit with Overage line, mirroring what the Sales Order screen lets a user change: the discount (discountAmount, or discountPercentage on a 0–100 scale) and the invoicing schedule (invoiceTiming, lineInvoiceDay). Price model, invoice frequency and the overage prices always come from the product's catalog Overage and its price-book entry — they cannot be overridden here, exactly as on the screen. A tier-priced overage takes its tiers from the price book."},"InlineCustomer":{"type":"object","properties":{"additionalContactEmail":{"type":"string","description":"Secondary address copied on customer correspondence.","examples":["finance@contoso.example"]},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAddress"},"description":"The customer's addresses, each naming the slot it fills. Both a `billTo` and a `soldTo` address are needed before an order can be raised, so supply both here."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel expenses appear on the invoice: `detailed` line by line, or `consolidated` into one figure.","examples":["detailed"]},"businessIdentificationNumber":{"type":"string","description":"The customer's business registration number.","examples":["HRB 123456"]},"businessType":{"type":"string","description":"Whether the customer is a `company` or an `individual`.","examples":["company"]},"customerType":{"type":"string","description":"A CustomerPartnerResellerType member: `default` or `partner`. `endCustomer` is rejected here, because it requires a partner link this contract does not carry.","examples":["default"]},"defaultCurrency":{"type":"string","description":"ISO 4217 code the customer is billed in unless an order says otherwise.","examples":["EUR"]},"entityId":{"type":"string","description":"UUID of the legal Entity that owns the customer. It can be moved later with PATCH accounting/customers/:id; existing sales orders keep their own entity.","examples":["1c9e5f38-7b04-4a26-8d31-5f60e2ab7c95"]},"exemptionNumber":{"type":"string","description":"The exemption certificate number. Only accepted while `taxExempt` is true.","examples":["EX-2026-0042"]},"externalIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdentifier"},"description":"Identifiers the customer carries in other systems, upserted by `fieldName`. A `fieldName` may appear only once."},"invoiceConsolidation":{"type":"string","description":"What invoices are grouped by: `customer`, `purchaseOrderNumber` or `salesArrangement`.","examples":["customer"]},"invoiceDeliveryMode":{"type":"string","description":"Whether invoices go out `automated` or are sent `manual`ly.","examples":["automated"]},"invoiceEmail":{"type":"string","description":"Address invoices are sent to.","examples":["ap@contoso.example"]},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether credit-card surcharges are waived for this customer."},"mainContactName":{"type":"string","description":"Name of the primary contact person.","examples":["A. Meyer"]},"mainEmail":{"type":"string","description":"Primary contact address for the customer.","examples":["hello@contoso.example"]},"name":{"type":"string","description":"Legal or trading name of the customer.","examples":["Contoso GmbH"]},"parentId":{"type":"string","description":"UUID of the customer above this one in the business-partner hierarchy. One that names no customer fails the request with UNKNOWN_REFERENCE.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]},"partnerId":{"type":"string","description":"UUID of the partner this customer buys through. One that names no customer fails the request with UNKNOWN_REFERENCE.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]},"partnerType":{"type":"string","description":"How a `partner` customer acts: `reseller` or `thirdPartyPayer`.","examples":["reseller"]},"payment":{"$ref":"#/components/schemas/CustomerPayment","description":"Payment-provider link registered for the customer once it has been created."},"paymentTermCode":{"type":"string","description":"The customer's payment term, named by its code as configured for `entityId`. A code that entity does not have fails the request with UNKNOWN_REFERENCE, and no order is created.","examples":["NET30"]},"preferredLanguage":{"type":"string","description":"A PreferredLanguage member; `english` is the only one today.","examples":["english"]},"salesChannel":{"type":"string","description":"A SalesChannel member: `salesAssisted` or `selfServe`.","examples":["salesAssisted"]},"segment":{"type":"string","description":"A CustomerSegment member: `SMB`, `MidMarket` or `Enterprise`.","examples":["Enterprise"]},"status":{"type":"string","description":"Whether the customer is `active` or `inactive`.","examples":["active"]},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax. Must be true before `exemptionNumber` is accepted."},"taxExemptCode":{"type":"string","description":"The code behind the exemption — the reason category the authority uses.","examples":["RESALE"]},"taxRegistrations":{"type":"array","items":{"$ref":"#/components/schemas/TaxRegistration"},"description":"Tax registrations to record, upserted by (`country`, `type`)."}},"additionalProperties":false,"required":["entityId","name"],"description":"A new customer created alongside the order, mirroring the Customer create API. `name`, `entityId` (a UUID) are required; addresses are a single list with a `type` of billTo/soldTo. Created through the shared customer core-write path."},"CustomerPayment":{"type":"object","properties":{"externalCustomerId":{"type":"string","description":"The customer's id in the provider's system.","examples":["cus_NffrFeUfNV2Hib"]},"externalPaymentMethodId":{"type":"string","description":"The payment method's id in the provider's system. Requires `externalCustomerId` — a method with no customer to hang it on is rejected.","examples":["pm_1NGY3s2eZvKYlo2CQmRz9k4T"]},"provider":{"type":"string","description":"The payment provider, named exactly as the tenant's provider configuration spells it. Required as soon as either external id is supplied, and an unconfigured name is rejected.","examples":["Stripe"]}},"additionalProperties":false,"description":"Payment-provider integration for an inline customer: provider (e.g. Stripe, BillDotCom) plus the customer/payment-method ids in that provider's system. provider is required when either external id is supplied."},"TaxRegistration":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 code of the jurisdiction the customer is registered in. Together with `type` it is what a registration is upserted by.","examples":["DE"]},"effectiveDate":{"type":"string","format":"date","description":"Day the registration takes effect.","examples":["2026-01-01"]},"isActive":{"type":"boolean","description":"Whether the registration is currently in force."},"note":{"type":"string","description":"Free-text note kept with the registration.","examples":["Filed with the Munich tax office"]},"taxNumber":{"type":"string","description":"The registration number as the authority issues it.","examples":["DE123456789"]},"type":{"type":"string","description":"A TaxRegistrationType member: `tax`, `salesTax`, `VAT`, `GST`, `EIN` or `TIN`. Together with `country` it is what a registration is upserted by.","examples":["VAT"]}},"additionalProperties":false,"required":["country","taxNumber","type"],"description":"A customer tax registration in a jurisdiction. country (ISO 3166-1 alpha-2), taxNumber and type (`tax`/`salesTax`/`VAT`/`GST`/`EIN`/`TIN`) are required; effectiveDate (YYYY-MM-DD), isActive and note are optional."},"CustomerAddress":{"type":"object","properties":{"attention":{"type":"string","description":"Person or department correspondence to this address is directed to.","examples":["Accounts Payable"]},"city":{"type":"string","description":"City.","examples":["München"]},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","examples":["DE"]},"isDefault":{"type":"boolean","description":"Marks this entry as the default for its `type`. At most one address per type may set it; when no entry of a type is marked, the first one of that type becomes its default."},"line1":{"type":"string","description":"Street and number.","examples":["Prinzregentenstraße 22"]},"line2":{"type":"string","description":"Second address line, where the address needs one.","examples":["4. OG"]},"stateProvince":{"type":"string","description":"State, province or region, where the country uses one.","examples":["Bayern"]},"type":{"type":"string","description":"Which slot this address fills: `billTo` for the address invoices go to, `soldTo` for the contracting party. An order can only be raised once the customer has one of each.","examples":["billTo"]},"zipCode":{"type":"string","description":"Postal code.","examples":["80538"]}},"additionalProperties":false,"required":["city","country","line1","type","zipCode"],"description":"A customer address. `type` is `billTo` or `soldTo`. At most one address per type may set isDefault."},"ExternalIdentifier":{"type":"object","properties":{"externalUrl":{"type":"string","description":"Deep link to the record in the owning system, shown beside the id.","examples":["https://netsuite.example.com/app/accounting/transactions/salesord.nl?id=10042"]},"fieldName":{"type":"string","description":"Names the ExternalIdentifierConfiguration this id belongs to, as that configuration spells it. It must already be configured for the tenant; an unknown name is rejected. Identifiers are upserted by this name, so sending it again overwrites the stored value.","examples":["netsuiteInternalId"]},"value":{"type":"string","description":"The identifier as the owning system spells it.","examples":["SO-10042"]}},"additionalProperties":false,"required":["fieldName","value"],"description":"An external identifier owned by another system (e.g. NetSuite, Salesforce): `fieldName` must match an ExternalIdentifierConfiguration, `value` is the id in that system, and `externalUrl` optionally links to the record there. Upserted by fieldName."},"Subscription":{"type":"object","properties":{"autoRenew":{"type":"boolean","description":"Whether the subscription renews itself at the end of its term."},"externalSubscriptionId":{"type":"string","description":"The subscription's id in the system that owns it, kept for reconciliation.","examples":["sub_1NGY3s2eZvKYlo2C"]},"products":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionProductLine"},"description":"The recurring product lines of this subscription. Every one must be a subscription-based product line — a one-time line placed here is rejected with `INVALID_SUBSCRIPTION_PRODUCT` and belongs in the order's `nonSubscriptionProducts` instead."},"serviceEndDate":{"type":"string","format":"date","description":"Last day the subscription is in service. Omit it on an evergreen subscription.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day the subscription is in service.","examples":["2026-01-01"]},"term":{"type":"string","format":"decimal","description":"Intended length of a `termed` subscription in months. What actually bounds the subscription is `serviceStartDate` and `serviceEndDate`, so supply the end date to fix when it ends.","examples":["12"]},"termType":{"type":"string","description":"`termed` for a subscription of fixed length, `evergreen` for an open-ended one that keeps renewing. A single evergreen subscription makes the whole order evergreen, which leaves the order's service end date open.","examples":["termed"]}},"additionalProperties":false,"required":["products","serviceStartDate","termType"],"description":"A subscription grouping recurring product lines. `termType` is `termed` (fixed end date; `term` in months required) or `evergreen` (open-ended, auto-renewing); autoRenew toggles renewal; serviceStartDate is required and serviceEndDate is derived from term when omitted; `products` are its SubscriptionProductLines. externalSubscriptionId links an external system's subscription."},"SubscriptionProductLine":{"type":"object","properties":{"allowance":{"$ref":"#/components/schemas/LineAllowance","description":"The Allowance & Overage terms of a Commit with Overage line. Required for that line type and rejected on any other; omitted fields default from the product catalog."},"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice`, in the order currency. Used when no `unitPrice` is given, and then drives the other two.","examples":["120.00"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice` on a 0–100 scale, so `10` means ten percent. Stored as a 0–1 fraction. The lowest precedence of the three — used only when neither `unitPrice` nor `discountAmount` is given.","examples":["10"]},"externalIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdentifier"},"description":"Identifiers this line carries in other systems, upserted by `fieldName`."},"invoiceFrequency":{"type":"string","description":"How often the line invoices — an InvoiceFrequency member: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually`, `once`, `custom`, `template`, `milestone`, `allAtOnce` or `termEnd`. Defaults to the product line's own setting.","examples":["monthly"]},"invoiceFrequencyTemplateId":{"type":"string","description":"UUID of the invoice frequency template","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"invoiceTiming":{"type":"string","description":"Whether the line invoices `advance` (at the start of the service period) or `arrears` (after it). Defaults from the entity's active invoice policy for this line type.","examples":["advance"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the line invoices on: `anniversary`, `first`, `last` or `specific`. Defaults from the entity's active invoice policy.","examples":["anniversary"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price per unit, in the order currency. Defaults to the list price the order's price book holds for this product line, and is the figure the other pricing fields are reconciled against.","examples":["1200.00"]},"priceModel":{"type":"string","description":"How the line is priced: `flat`, `perUnit`, `tiered`, `volume`, `stairstep` or `rateCard`. Defaults to the product line's own model. `tiered`, `volume` and `stairstep` take their prices from `tiers` and `rateCard` from `rateCardEntries`, so for those the line-level discount fields are not reconciled. `thresholdBased` is rejected: it needs a base line plus a metered usage child, which this endpoint does not build.","examples":["perUnit"]},"pricingTerm":{"type":"string","description":"The period the price is quoted for: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually` or `once`. Defaults to the product line's own term.","examples":["annually"]},"productLineId":{"type":"string","description":"UUID of the ProductLine being ordered. It settles the product, the line type and the billing rules every omitted field defaults from. It must exist, and it must not be threshold-based or prepaid: those need a base line plus a metered usage child under one product, which this endpoint does not build.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]},"quantity":{"type":"string","format":"decimal","description":"Number of units ordered. Required unless the line takes its quantity from somewhere else: usage-metered line types (PayAsYouGo, Usage, Billable*) meter it from usage records, so for those it must be omitted or 0 (a non-zero value is rejected, matching the Sales Order screen); tier-priced models (`tiered`, `volume`, `stairstep`, `thresholdBased`) derive it from the tier structure, so for those it defaults to zero. Anywhere else, omitting it fails the request.","examples":["10"]},"rampDeal":{"$ref":"#/components/schemas/RampDeal","description":"Scheduled changes to quantity and price across the line's life. Subscription lines only."},"rateCardEntries":{"type":"array","items":{"$ref":"#/components/schemas/RateCardEntry"},"description":"Per-unit rates for a `rateCard`-priced line. Supplying any entry moves pricing onto the rate card, so the line-level discount fields stop being reconciled."},"serviceEndDate":{"type":"string","format":"date","description":"Last day of the line's service period. The order's own service end is the latest across all its lines, and is left open on an evergreen order.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the line's service period. The order's own service start is the earliest across all its lines.","examples":["2026-01-01"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/LineTag"},"description":"Value-accounting tags to allocate this line by. Requires value-allocation tagging to be enabled for sales orders."},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/LineTier"},"description":"The pricing tiers of a `tiered`, `volume` or `stairstep` line. The ranges must be contiguous, and the last tier is left open-ended by omitting its `toQuantity`."},"totalPrice":{"type":"string","format":"decimal","description":"Total for the line, in the order currency. Persisted exactly as supplied rather than recomputed — omit it and the line's own pricing drives the total. Rejected unless omitted or 0 on usage-metered line types (PayAsYouGo, Usage, Billable*), which have no fixed contract value.","examples":["12960.00"]},"unitOfMeasure":{"type":"string","description":"The unit the line is priced and metered in. Defaults to the product line's own unit.","examples":["seat"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price per unit, in the order currency. The highest precedence of the three pricing inputs — supply it and `discountAmount` and `discountPercentage` are recomputed from it (discountAmount = listPrice − unitPrice).","examples":["1080.00"]}},"additionalProperties":false,"required":["productLineId"],"description":"A ProductLine within a subscription, plus an optional `rampDeal` for scheduled quantity/price changes over the line's life. All ProductLine pricing/defaulting rules apply, including `allowance` for Commit with Overage lines."},"RampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"The granularity the deal steps at: `monthly`, `quarterly` or `annually`.","examples":["annually"]},"invoiceTiming":{"type":"string","description":"Whether each segment invoices `advance` (at the start of its period) or `arrears` (after it).","examples":["advance"]},"ramps":{"type":"array","items":{"$ref":"#/components/schemas/Ramp"},"description":"The segments of the deal in order, earliest first. Together they span the subscription line's service period."}},"additionalProperties":false,"required":["interval","ramps"],"description":"A ramp deal: scheduled changes to quantity/price over a subscription line's life. `interval` is the granularity (`monthly`/`quarterly`/`annually`), invoiceTiming is `advance`/`arrears`, and `ramps` are the ordered segments. Subscription lines only."},"Ramp":{"type":"object","properties":{"invoiceFrequency":{"type":"string","description":"How often this segment invoices. Defaults to the subscription line's own setting.","examples":["monthly"]},"invoiceFrequencyTemplateId":{"type":"string","description":"UUID of the invoice frequency template.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price per unit for this segment, in the order currency. Defaults to `unitPrice`.","examples":["120.00"]},"quantity":{"type":"string","format":"decimal","description":"Number of units in force for this segment.","examples":["25"]},"serviceEndDate":{"type":"string","format":"date","description":"Last day of this segment. Defaults so that the segments run contiguously up to the next one.","examples":["2026-06-30"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of this segment. Defaults so that the segments run contiguously from the subscription line's own start.","examples":["2026-01-01"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price per unit for this segment, in the order currency.","examples":["99.00"]}},"additionalProperties":false,"required":["quantity","unitPrice"],"description":"One ramp segment of a ramp deal across a subscription line's service period: quantity and per-unit unitPrice (listPrice defaults to unitPrice) for the segment; serviceStartDate/serviceEndDate bound it (defaulting contiguously); invoiceFrequency defaults to the line setting. Dates are YYYY-MM-DD."},"RateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"UUID of the BillableComponent this row meters. Optional — a row may price a unit of measure without naming a component — but a UUID that does not resolve rejects the whole request.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"conversion":{"type":"string","format":"decimal","description":"Factor converting the billable unit into the reporting unit — 1000 when usage is metered per call but reported per thousand.","examples":["1000"]},"description":{"type":"string","description":"Free-text label for the row, carried through to the stored rate-card entry.","examples":["API calls beyond the included volume"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted rate per `unitOfMeasure`, in the order currency. Honoured only while the product line's `enforceListPrice` is false; otherwise the product line's own list price wins.","examples":["0.005"]},"unitOfMeasure":{"type":"string","description":"The unit this row is priced in.","examples":["apiCall"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated rate per `unitOfMeasure`, in the order currency.","examples":["0.004"]}},"additionalProperties":false,"required":["unitOfMeasure","unitPrice"],"description":"A rate-card row for a rateCard-priced line. `billableComponentId` is the BillableComponent id (a UUID) this row meters; unitPrice is the negotiated per-unit rate in the order currency; unitOfMeasure is how it is priced; listPrice is honoured only when the product line's enforceListPrice is false; conversion is the billable-to-reporting unit factor."},"LineTag":{"type":"object","properties":{"dimension":{"type":"string","description":"Name of the value-accounting dimension, as configured for the tenant. Resolved by name, not by id.","examples":["Department"]},"value":{"type":"string","description":"Name of the value within that dimension. The pair must resolve to an existing tag and the dimension must be enabled for sales orders; an unknown pair rejects the whole request.","examples":["Engineering"]}},"additionalProperties":false,"required":["dimension","value"],"description":"A value-accounting tag as a friendly `{ dimension, value }` name pair (e.g. { \"dimension\": \"Department\", \"value\": \"Engineering\" }). Both are the human-readable names; resolved against the tenant's value-accounting dimensions (an unknown dimension or value is rejected). Requires value-allocation tagging to be enabled."},"LineTier":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of the tier's quantity range, inclusive.","examples":["0"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price for this tier, in the order currency. Defaults to `unitPrice`, i.e. no discount on the tier.","examples":["15.00"]},"priceModel":{"type":"string","description":"How `unitPrice` applies within the tier: `perUnit` (the default) charges it for every unit in the range, `flat` charges it once for the whole tier.","examples":["perUnit"]},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of the tier's quantity range. Omit it on the last tier to leave the range open-ended.","examples":["100"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price for this tier, in the order currency. Charged per unit in the range when `priceModel` is `perUnit`, or once for the whole tier when it is `flat`.","examples":["12.50"]}},"additionalProperties":false,"required":["fromQuantity","unitPrice"],"description":"A pricing tier for tiered/volume/stairstep price models. Covers the quantity range [fromQuantity, toQuantity] (omit toQuantity on the open-ended last tier) at unitPrice; listPrice defaults to unitPrice; priceModel is `flat` or `perUnit` (defaults perUnit). Tiers are per-order and must cover contiguous ranges."},"ProductLine":{"type":"object","properties":{"allowance":{"$ref":"#/components/schemas/LineAllowance","description":"The Allowance & Overage terms of a Commit with Overage line. Required for that line type and rejected on any other; omitted fields default from the product catalog."},"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice`, in the order currency. Used when no `unitPrice` is given, and then drives the other two.","examples":["120.00"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice` on a 0–100 scale, so `10` means ten percent. Stored as a 0–1 fraction. The lowest precedence of the three — used only when neither `unitPrice` nor `discountAmount` is given.","examples":["10"]},"externalIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdentifier"},"description":"Identifiers this line carries in other systems, upserted by `fieldName`."},"invoiceFrequency":{"type":"string","description":"How often the line invoices — an InvoiceFrequency member: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually`, `once`, `custom`, `template`, `milestone`, `allAtOnce` or `termEnd`. Defaults to the product line's own setting.","examples":["monthly"]},"invoiceFrequencyTemplateId":{"type":"string","description":"UUID of the invoice frequency template.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"invoiceTiming":{"type":"string","description":"Whether the line invoices `advance` (at the start of the service period) or `arrears` (after it). Defaults from the entity's active invoice policy for this line type.","examples":["advance"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the line invoices on: `anniversary`, `first`, `last` or `specific`. Defaults from the entity's active invoice policy.","examples":["anniversary"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price per unit, in the order currency. Defaults to the list price the order's price book holds for this product line, and is the figure the other pricing fields are reconciled against.","examples":["1200.00"]},"priceModel":{"type":"string","description":"How the line is priced: `flat`, `perUnit`, `tiered`, `volume`, `stairstep` or `rateCard`. Defaults to the product line's own model. `tiered`, `volume` and `stairstep` take their prices from `tiers` and `rateCard` from `rateCardEntries`, so for those the line-level discount fields are not reconciled. `thresholdBased` is rejected: it needs a base line plus a metered usage child, which this endpoint does not build.","examples":["perUnit"]},"pricingTerm":{"type":"string","description":"The period the price is quoted for: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually` or `once`. Defaults to the product line's own term.","examples":["annually"]},"productLineId":{"type":"string","description":"UUID of the ProductLine being ordered. It settles the product, the line type and the billing rules every omitted field defaults from. It must exist, and it must not be threshold-based or prepaid: those need a base line plus a metered usage child under one product, which this endpoint does not build.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]},"quantity":{"type":"string","format":"decimal","description":"Number of units ordered. Required unless the line takes its quantity from somewhere else: usage-metered line types (PayAsYouGo, Usage, Billable*) meter it from usage records, so for those it must be omitted or 0 (a non-zero value is rejected, matching the Sales Order screen); tier-priced models (`tiered`, `volume`, `stairstep`, `thresholdBased`) derive it from the tier structure, so for those it defaults to zero. Anywhere else, omitting it fails the request.","examples":["10"]},"rateCardEntries":{"type":"array","items":{"$ref":"#/components/schemas/RateCardEntry"},"description":"Per-unit rates for a `rateCard`-priced line. Supplying any entry moves pricing onto the rate card, so the line-level discount fields stop being reconciled."},"serviceEndDate":{"type":"string","format":"date","description":"Last day of the line's service period. The order's own service end is the latest across all its lines, and is left open on an evergreen order.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the line's service period. The order's own service start is the earliest across all its lines.","examples":["2026-01-01"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/LineTag"},"description":"Value-accounting tags to allocate this line by. Requires value-allocation tagging to be enabled for sales orders."},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/LineTier"},"description":"The pricing tiers of a `tiered`, `volume` or `stairstep` line. The ranges must be contiguous, and the last tier is left open-ended by omitting its `toQuantity`."},"totalPrice":{"type":"string","format":"decimal","description":"Total for the line, in the order currency. Persisted exactly as supplied rather than recomputed — omit it and the line's own pricing drives the total. Rejected unless omitted or 0 on usage-metered line types (PayAsYouGo, Usage, Billable*), which have no fixed contract value.","examples":["12960.00"]},"unitOfMeasure":{"type":"string","description":"The unit the line is priced and metered in. Defaults to the product line's own unit.","examples":["seat"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price per unit, in the order currency. The highest precedence of the three pricing inputs — supply it and `discountAmount` and `discountPercentage` are recomputed from it (discountAmount = listPrice − unitPrice).","examples":["1080.00"]}},"additionalProperties":false,"required":["productLineId"],"description":"A product line to add to an order. `productLineId` (a UUID) defines the product and its billing rules. Pricing is reconciled from listPrice: supply `unitPrice`, or `discountAmount` (order currency), or `discountPercentage` (0-100 scale) — precedence unitPrice > discountAmount > discountPercentage; the rest are derived (unitPrice = listPrice − discountAmount). Tiered/volume/stairstep/rateCard lines carry prices on `tiers`/`rateCardEntries` instead. `quantity` is required except for usage-metered (PayAsYouGo, Usage, Billable*) or tier-priced lines. Dates are YYYY-MM-DD; invoiceFrequency/invoiceTiming/priceModel/pricingTerm/unitOfMeasure default to the product-line setting; `tags` and `externalIdentifiers` attach to the line; `totalPrice` is persisted as-is when supplied. A Commit with Overage line requires `allowance` (its Allowance & Overage terms); other line types reject it."}},"parameters":{"ApiVersion":{"name":"Api-Version","in":"header","required":true,"description":"The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`.","schema":{"type":"string","const":"v1","default":"v1"}}},"securitySchemes":{"systemAccessToken":{"type":"http","scheme":"bearer","description":"Bearer authentication with a system access token. Create a system access token, grant it the required permissions, and send its value in the `Authorization: Bearer <token>` header."},"webhookSignature":{"type":"apiKey","in":"header","name":"webhook-signature","description":"Signature of a webhook delivery, following the [Standard Webhooks](https://www.standardwebhooks.com) specification. Every delivery carries `webhook-id`, `webhook-timestamp` (Unix seconds) and `webhook-signature`, which holds one or more space-separated `v1,<base64>` signatures: normally one, two while a rolled secret is still valid.\n\nTo verify a delivery, compute the HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{raw body}`, keyed with the destination's secret without its `whsec_` prefix and base64-decoded, and base64-encode the result. Accept the delivery if the result equals any `v1` signature, compared in constant time, and reject a `webhook-timestamp` more than five minutes from your clock. Use the body exactly as received: parsing and re-serializing it changes the bytes."}}},"security":[{"systemAccessToken":[]}],"tags":[{"name":"CRM","kind":"nav","description":"The CRM surface: prospects, opportunities, opportunity stages and quotes.\n\nA prospect is a lead not yet qualified into an opportunity. An opportunity tracks a potential deal through its sales stages before it becomes a quote or a sales order. The opportunity stages of a legal entity are the ordered steps its opportunities move through. A quote is the offer made to a customer before a sales order, scoped to one opportunity.","x-displayName":"CRM"},{"name":"PSA","kind":"nav","description":"Records for professional services automation (PSA): PSA projects with their activities, positions, team members, allocations, time entries, milestones, fixed fees, and expenses, plus the project types and placeholders shared across projects.","x-displayName":"PSA"},{"name":"accounting","kind":"nav","description":"Accounting covers the general ledger and its setup, financial reports, customer sales and billing, revenue recognition, vendors and purchasing, expenses and payroll, and fixed assets.","x-displayName":"Accounting"},{"name":"accounting/products","kind":"nav","parent":"accounting","description":"Products are the goods and services a legal entity sells to customers through sales orders and quotes.","x-displayName":"Products"},{"name":"accounting/products/productLines","kind":"nav","parent":"accounting/products","description":"A product line is one way a product is sold and invoiced, with its own line type, price model, invoice frequency, and pricing.\n\nA product can have several product lines. The endpoints that add, change, or delete a product line or its pricing are under its product, at accounting/products/:id/product-lines.","x-displayName":"Product Lines"},{"name":"accounting/reports","kind":"nav","parent":"accounting","description":"Reports show the general ledger, the trial balance, and financial statements, built from journal entries.","x-displayName":"Reports"},{"name":"accounting/reports/generalLedger","kind":"nav","parent":"accounting/reports","description":"The general ledger is every journal entry line posted to it, plus the calculated lines that make the financial statements balance.","x-displayName":"General Ledger"},{"name":"accounting/reports/trialBalances","kind":"nav","parent":"accounting/reports","description":"A trial balance lists each account's opening balance, debits, credits, and closing balance for one legal entity and accounting book over a date range.\n\nA trial balance is calculated from the journal entries in the general ledger each time you request it, so there is nothing to create, update, or delete. All amounts are in the one currency that reportingCurrency names.","x-displayName":"Trial Balances"},{"name":"accountingAccountingPeriodStatuses","kind":"nav","parent":"accounting","description":"An accounting period status is the open or closed state of one accounting period for one legal entity and accounting book.\n\nThe same period can be open for one legal entity and closed for another, so each legal entity and accounting book has its own status for it.\n\npostable says whether journal entries can be posted to the general ledger in the period. It is true when the status is open or reopened. It doesn't reflect locks that apply only to some types of journal entry.","x-displayName":"Accounting Period Status"},{"name":"accountingAccountingPeriods","kind":"nav","parent":"accounting","description":"An accounting period is one period of a fiscal calendar for one legal entity and accounting book, with its own status.\n\nThe same period can be open for one legal entity and closed for another, because each legal entity and accounting book has its own status for it.\n\npostable says whether journal entries can be posted to the general ledger in the period. It is true when the status is open or reopened. It doesn't reflect locks that apply only to some types of journal entry.\n\nTo change a period's status, use POST accounting/period-status/:id/execute-task.","x-displayName":"Accounting Periods"},{"name":"accountingAccounts","kind":"nav","parent":"accounting","description":"Accounts are the general ledger accounts in a chart of accounts, each classified by type and subtype.","x-displayName":"Accounts"},{"name":"accountingAdvancePaymentCategories","kind":"nav","parent":"accounting","description":"An advance payment category sets the accounts that employee advances use: the bank account an advance is paid from, and the offset account that records the advance until an expense report settles it.\n\nEach legal entity has at most one advance payment category, and employee advance requests refer to it.\n\nThe category's bank and offset accounts are set for each chart of accounts, and no endpoint reads or sets them.","x-displayName":"Advance Payment Categories"},{"name":"accountingAmortizationScheduleLines","kind":"nav","parent":"accounting","description":"An amortization schedule line is one period's amount of an amortization schedule.\n\nThe amortization schedule has the method, the term, and the source document. There is no endpoint to change a line. An installment's journal entry is posted to the general ledger through the amortization schedule.\n\noutstanding is true when an installment's journal entry hasn't been posted and the installment isn't confirmed as zero. Filter on outstanding rather than working it out from isJournalEntryPosted and isConfirmedZero. isConfirmedZero can be unset, and if you treat unset as false you miss outstanding lines.\n\nTo find out whether amortization blocks a period close, filter by legal entity, accounting book, and the period end date, not by the period id. An installment scheduled in an earlier period whose journal entry was never posted also blocks the close, and a scheduledPeriodId filter misses it.\n\nA line has no legal entity of its own. Its entityId comes from the source journal entry line of the schedule, so a line whose schedule or source document was deleted has no entityId. Those lines are still returned but don't match an entity filter, so check for lines with no entityId when you reconcile to zero.","x-displayName":"Amortization Schedule Lines"},{"name":"accountingBooks","kind":"nav","parent":"accounting","description":"An accounting book is a self-contained ledger within the tenant, to which journal entries, accounts, and legal entities are assigned.","x-displayName":"Books"},{"name":"accountingChartsOfAccounts","kind":"nav","parent":"accounting","description":"A chart of accounts is the numbering scheme that organizes a legal entity's general ledger accounts.","x-displayName":"Charts of Accounts"},{"name":"accountingCreditMemos","kind":"nav","parent":"accounting","description":"Credit memos are amounts a legal entity has credited back to a customer.","x-displayName":"Credit Memos"},{"name":"accountingCustomers","kind":"nav","parent":"accounting","description":"The customer directory of accounting: who the entity bills and is billed by. Sits under Accounting, beside the other domains of that module.","x-displayName":"Customers"},{"name":"accountingDebitMemos","kind":"nav","parent":"accounting","description":"A debit memo is an additional charge to a customer that settles a credit memo.","x-displayName":"Debit Memos"},{"name":"accountingEmployeeAdvances","kind":"nav","parent":"accounting","description":"An employee advance is money paid to an employee in advance. The money is requested by the employee and paid once the request is approved.\n\nEach request belongs to the employee who created it and to that employee's legal entity.\n\nA request goes through your tenant's approval policy, from 'pendingApproval' to 'approved' or 'rejected'. Issuing an approved request creates the outbound payment and its journal entry and sets the status to 'issued'. An expense report can later settle the advance.","x-displayName":"Employee Advances"},{"name":"accountingExpenseCategories","kind":"nav","parent":"accounting","description":"An expense category classifies expense items and sets which general ledger accounts their journal entries use.\n\nEach category is available in a set of legal entities and is linked to a set of general ledger accounts. Expense items refer to a category.\n\nTo stop using a category that expense items refer to, set its status to 'inactive'.","x-displayName":"Expense Categories"},{"name":"accountingExpenseReports","kind":"nav","parent":"accounting","description":"An expense report is a set of expense items that an employee submits for approval and reimbursement.\n\nA report belongs to one employee, and every expense item on it belongs to that employee. The report is reimbursable unless one of its items sets reimbursable to false. The report totals are in reimbursementCurrency, and each item's amount is in the item's own currency.\n\nA submitted report starts in 'pendingApproval' and goes through your tenant's approval policy. An approved, reimbursable report is paid with an outbound payment.","x-displayName":"Expense Reports"},{"name":"accountingFiscalCalendars","kind":"nav","parent":"accounting","description":"Fiscal calendars define how a year is divided into accounting periods.\n\nA fiscal calendar sets whether the year is divided into months or quarters, and when the year starts.\n\nEach period of a calendar, for each legal entity and accounting book, is an accounting period. To list them, use GET accounting/accounting-periods?filter[fiscalCalendarId][eq]=<id>.\n\nNo endpoint finds a calendar by name. List the calendars and match the name in your own code.","x-displayName":"Fiscal Calendars"},{"name":"accountingIntercompanyBills","kind":"nav","parent":"accounting","description":"An intercompany bill records a charge from one legal entity to another in the same tenant, such as a parent legal entity charging a subsidiary for shared services.\n\nEach bill has an issuing legal entity, a receiving legal entity, one currency for all its amounts, and an optional markup. The markup is a percentage of each line or a flat fee split across the lines. Each line has an amount and the general ledger accounts that each legal entity's side of the journal entry uses.\n\nThe bill's intercompany process supplies the intercompany accounts that balance each legal entity's side of the journal entry.\n\nThere is no endpoint to create, publish, or void an intercompany bill.","x-displayName":"Intercompany Bills"},{"name":"accountingInvoiceFrequencyTemplates","kind":"nav","parent":"accounting","description":"An invoice frequency template is a reusable invoicing schedule, written as an RFC 5545 recurrence rule, that a sales order product line can use instead of a fixed invoice frequency.","x-displayName":"Invoice Frequency Templates"},{"name":"accountingInvoiceRuns","kind":"nav","parent":"accounting","description":"An invoice run invoices the pending lines of one sales order, customer, or legal entity, and records the invoices it created and the lines that failed.","x-displayName":"Invoice Runs"},{"name":"accountingInvoices","kind":"nav","parent":"accounting","description":"Invoices are what a legal entity has billed a customer for, and what is still owed on each one.","x-displayName":"Invoices"},{"name":"accountingJournalEntries","kind":"nav","parent":"accounting","description":"A journal entry is a set of debit and credit lines for the general ledger.","x-displayName":"Journal Entries"},{"name":"accountingOutboundPayments","kind":"nav","parent":"accounting","description":"An outbound payment is money paid to a vendor or employee for their vendor bills or expense reports.\n\nA payment has one or more payment items, and each item pays one vendor bill or expense report. GET and search return the items in lines.\n\nA payment that hasn't been executed can be changed or deleted. A payment that is 'successful', 'partiallySuccessful', or 'processing' can only be voided. Deleting or voiding a payment makes the documents it paid open again.\n\nPayroll payments and standalone payments are outbound payments too, with their own endpoints.","x-displayName":"Outbound Payments"},{"name":"accountingPaymentTerms","kind":"nav","parent":"accounting","description":"The payment terms of accounting: the agreed schedules on which an invoice becomes due, and the early-payment discounts attached to them. These are the tenant-wide catalogue: a term can be used on a record only once it is assigned to that record's legal entity, so a listed code can still be refused by a write such as POST accounting/customers. Sits under Accounting, beside the other domains of that module.","x-displayName":"Payment Terms"},{"name":"accountingPayments","kind":"nav","parent":"accounting","description":"A payment is money received from a customer and applied to the customer's invoices, with any unapplied balance left on the payment.","x-displayName":"Payments"},{"name":"accountingPayrollDetails","kind":"nav","parent":"accounting","description":"A payroll detail is a set of payroll lines recorded in a journal entry for one legal entity, one line per employee or department.\n\nEach payroll detail uses a payroll template, which sets its categories, the rule for its journal entry date, and its clearing account. Across all lines, gross pay equals deductions plus net pay.\n\nPayroll payments pay a payroll detail, in full or in part.","x-displayName":"Payroll Details"},{"name":"accountingPayrollPayments","kind":"nav","parent":"accounting","description":"A payroll payment is an outbound payment that pays one or more payroll details.\n\nEach application ties part of the payment to one payroll detail and one payee. A payment can't overpay a payroll detail, for one payee or in total.\n\nA payroll payment is also an outbound payment, with the same id.","x-displayName":"Payroll Payments"},{"name":"accountingPayrollTemplates","kind":"nav","parent":"accounting","description":"A payroll template maps an imported payroll file to the journal entry of a payroll detail, with a debit account and a credit account for each payroll category.\n\nA template serves one or more legal entities, and each of its categories covers one kind of payroll amount, such as gross pay or net pay. Each payroll detail uses one template.\n\nWhen a template is created or updated through these endpoints, its status is set to 'active' if it has an active netPay category and an active grossPay category, and to 'inactive' otherwise. No endpoint sets the status directly.","x-displayName":"Payroll Templates"},{"name":"accountingPerformanceObligations","kind":"nav","parent":"accounting","description":"A performance obligation is something a legal entity has promised to deliver, and the basis for allocating and scheduling its revenue.","x-displayName":"Performance Obligations"},{"name":"accountingPriceBooks","kind":"nav","parent":"accounting","description":"A price book is a named set of list prices that sales orders use.","x-displayName":"Price Books"},{"name":"accountingPurchaseOrders","kind":"nav","parent":"accounting","description":"A purchase order records the goods or services a legal entity orders from a vendor.\n\nAn order can be created from purchase requests, and goods receipts and vendor bills are matched to the order's lines. Each order goes through your tenant's approval policy, and approvalStatus shows the result.","x-displayName":"Purchase Orders"},{"name":"accountingPurchaseRequests","kind":"nav","parent":"accounting","description":"A purchase request asks for internal approval to buy goods or services before you commit to a vendor. A purchase order can then be created from the approved request.\n\nEach request goes through your tenant's approval policy. There is no endpoint to delete a purchase request. Rejecting a request stops it.","x-displayName":"Purchase Requests"},{"name":"accountingRefunds","kind":"nav","parent":"accounting","description":"A refund returns part or all of a customer's payment to the customer.\n\nYou can create, read, and update refunds, but there is no endpoint to delete one.","x-displayName":"Refunds"},{"name":"accountingReportsFinancialStatement","kind":"nav","parent":"accounting/reports","description":"A financial statement, such as an income statement, balance sheet, or cash flow statement, is a report built from a configured template.","x-displayName":"Financial Statement"},{"name":"accountingRevenueContracts","kind":"nav","parent":"accounting","description":"A revenue contract sets how the obligations of a sales order are recognized as revenue over the life of the contract.","x-displayName":"Revenue Contracts"},{"name":"accountingRevenueSchedulingTemplates","kind":"nav","parent":"accounting","description":"A revenue scheduling template sets how revenue is recognized and amortized, and which event starts a revenue plan.","x-displayName":"Revenue Scheduling Templates"},{"name":"accountingSalesOrderShipments","kind":"nav","parent":"accounting","description":"A sales order shipment records goods sent to a customer for a sales order, with the sales order product items it covers.\n\nEach shipment is a document in inventory. The record these endpoints return is its copy in accounting, linked by inventoryShipmentId. A shipment can't exist in accounting alone.","x-displayName":"Sales Order Shipments"},{"name":"accountingSalesOrders","kind":"nav","parent":"accounting","description":"The sales orders of accounting: what the entity has agreed to deliver and bill for. Sits under Accounting, beside the other domains of that module.","x-displayName":"Sales Orders"},{"name":"accountingSalesReturns","kind":"nav","parent":"accounting","description":"A sales return is a return against a sales order, for credit or for a replacement, with its own lines and an approval workflow.","x-displayName":"Sales Returns"},{"name":"accountingStandalonePayments","kind":"nav","parent":"accounting","description":"A standalone payment is an outbound payment to a vendor or employee that names no source document when it is recorded, and is applied later to vendor bills, expense reports, or withholding tax entries.\n\nA standalone payment is created as an outbound payment whose lines name no source document. There is no separate endpoint to create one.","x-displayName":"Standalone Payments"},{"name":"accountingSubscription","kind":"nav","description":"A subscription is a customer's **recurring service**, tracked by its lines, term type, and lifecycle status.\n\n## Finding subscriptions\n\n[subscriptions](#operation/subscriptions) is the collection header; [searchSubscription](#operation/searchSubscription) returns the full record, including the customer/entity references and cancellation/suspension notes List omits.\n\n## Changing one\n\n[modifySubscription](#operation/modifySubscription) applies line-level changes (add, change quantity, cancel, or replace products) effective on a modification date, or — via `modificationType: renew`, or `earlyRenew` from a given date — renews the whole subscription for another term. Every modification type except a cancellation-only payload materializes a sales order.\n\n## Ending one\n\n[cancelSubscription](#operation/cancelSubscription) fully cancels a subscription: every line ends on the cancellation date. For a partial cancellation, or one combined with other changes, use modifySubscription's cancelLines/replaceGroups instead.\n","x-displayName":"Subscription","summary":"Recurring service a customer has bought from a legal entity: renewal terms, service dates, and cancellation/suspension state.","x-whenToUse":"Modifying, renewing, cancelling, listing or searching a subscription, or anything carrying a subscription id.","parent":"accountingSubscriptions"},{"name":"accountingSubscriptions","kind":"nav","parent":"accounting","description":"A subscription is a recurring purchase by a customer, with its renewal terms, service dates, cancellation, and suspension status, and recurring revenue.","x-displayName":"Subscriptions"},{"name":"accountingTaxConfigurations","kind":"nav","parent":"accounting","description":"A tax configuration is a legal entity's set of tax codes and the general ledger accounts each tax code uses.","x-displayName":"Tax Configurations"},{"name":"accountingUsages","kind":"nav","parent":"accounting","description":"A usage record measures how much a customer used, so that it can be invoiced.","x-displayName":"Usage"},{"name":"accountingVendorBills","kind":"nav","parent":"accounting","description":"A vendor bill is an invoice that a legal entity receives from a vendor.\n\nA bill starts in 'pendingApproval' and goes through your tenant's approval policy. Approval makes the bill payable and creates its journal entry in the general ledger, unless the bill's total is zero or a line has no accountId. A rejected bill has no journal entry.\n\nOutbound payments pay a bill, and vendor credits can be applied to a bill.","x-displayName":"Vendor Bills"},{"name":"accountingVendorCredits","kind":"nav","parent":"accounting","description":"A vendor credit is a credit memo from a vendor that can be applied against that vendor's bills.\n\nA credit's available balance goes down as the credit is applied to vendor bills and goes back up when an application is undone.","x-displayName":"Vendor Credits"},{"name":"accountingVendors","kind":"nav","parent":"accounting","description":"A vendor is someone a legal entity buys from and pays.\n\nEach vendor has a business partner with the same name, created with the vendor. Journal entries record the business partner, not the vendor.\n\nA vendor with history can't be deleted. Deactivate it instead.","x-displayName":"Vendors"},{"name":"assetManagement","kind":"nav","parent":"accounting","description":"Asset management covers fixed assets and how they are depreciated.\n\nA fixed asset is the accounting record of an asset, such as a forklift, in one accounting book. Every fixed asset has a fixed asset type, such as machinery or vehicles.\n\nA depreciation policy sets how fixed assets of each type are depreciated. It sets the useful life, the default depreciation method and period length, and the accounts that depreciation and disposal journal entries post to.\n\nSaving a fixed asset creates its depreciation schedule. The schedule is the plan for depreciating the fixed asset over its useful life, with a line for each period. Recording depreciation for the lines creates the journal entries. You can record depreciation through the API.","x-displayName":"Asset Management"},{"name":"banking","kind":"nav","description":"Banking covers bank accounts, bank entries, credit card entries, fund transfers, the transactions a bank reports, and the bank rules that create bank entries or credit card entries from those transactions.","x-displayName":"Banking"},{"name":"bankingBankAccounts","kind":"nav","parent":"banking","description":"A bank account is a legal entity's account at a bank, linked to a general ledger account and used for payments and reconciliation.","x-displayName":"Bank Accounts"},{"name":"bankingBankEntries","kind":"nav","parent":"banking","description":"A bank entry records money moving into or out of a bank account, and posts a journal entry to the general ledger from its lines.","x-displayName":"Bank Entries"},{"name":"bankingBankRules","kind":"nav","parent":"banking","description":"A bank rule creates a bank entry or credit card entry for each bank transaction on its bank accounts that meets its criteria, and matches the transaction to it.","x-displayName":"Bank Rules"},{"name":"bankingBankTransactions","kind":"nav","parent":"banking","description":"Bank transactions are the movements a bank reports for an account, the raw side of reconciliation.","x-displayName":"Bank Transactions"},{"name":"bankingCreditCardEntries","kind":"nav","parent":"banking","description":"A credit card entry records a charge or credit on a credit card account, and posts a journal entry to the general ledger from its lines.","x-displayName":"Credit Card Entries"},{"name":"bankingFundTransfers","kind":"nav","parent":"banking","description":"A fund transfer moves money between two accounts of the same legal entity, or between two legal entities.","x-displayName":"Fund Transfers"},{"name":"base","kind":"nav","description":"The base module's shared master data: the legal entities every other module's records belong to, and the reference data that joins them.","x-displayName":"Base"},{"name":"baseApprovalPolicies","kind":"nav","parent":"base","description":"An approval policy is the set of rules that decides who must approve a document, for which legal entity and which document type.","x-displayName":"Approval Policies"},{"name":"baseEntities","kind":"nav","parent":"base","description":"Legal entities are the organizations a tenant keeps its accounts for, including non-legal reporting entities.","x-displayName":"Entities"},{"name":"basePermissions","kind":"nav","parent":"base","description":"A permission role or task is a set of access rights that you can assign to users and positions.","x-displayName":"Permissions"},{"name":"baseReportingTags","kind":"nav","parent":"base","description":"Reporting tags are the dimensions a transaction can be tagged with: the nine system dimensions (department, business unit, team, location, region, employee, vendor, customer, value center) and the tenant-defined custom ones. This surface decodes stored tag references into their display names, and lists the tenant's custom dimensions and the values within them.","x-displayName":"Reporting Tags"},{"name":"baseSlackWorkspaces","kind":"nav","parent":"base","description":"Slack workspaces a tenant admin connected through the Lensing Slack app.","x-displayName":"Slack Workspaces"},{"name":"crm-prospects","kind":"nav","parent":"CRM","description":"A prospect is an organization an entity is selling to before it becomes a customer, in the CRM alongside its opportunities and quotes.\n\nThree read endpoints share one item schema: GET crm/prospects/:id, GET crm/prospects and POST crm/prospects/search. GET crm/prospects omits contacts[], every contact of the prospect, which the other two return. POST crm/prospects and PATCH crm/prospects/:id create and change one prospect by the rules of the prospect form in the app; POST crm/prospects/bulk and PATCH crm/prospects/bulk do the same for up to 100 at once, all-or-nothing. A prospect converted to a customer can no longer be changed. Prospects cannot be deleted, as in the app.","x-displayName":"Prospects"},{"name":"crm-quotes","kind":"nav","parent":"CRM","description":"A quote is a priced offer a legal entity puts in front of a customer before a sales order exists.\n\nA quote is read three ways. GET crm/quotes lists quote headers, GET crm/quotes/:id reads one quote in full, and POST crm/quotes/search finds quotes by criteria a query string cannot carry and returns each match in full. The full quote adds subscriptions[] and nonRecurringProducts[], the priced lines, which GET crm/quotes omits. A quote has two identifiers: id, which every endpoint takes, and quoteNumber, the business number assigned by a number range, which may be absent on a quote read right after creation. A quote is written two ways. POST crm/quotes creates one with its whole line tree, and PATCH crm/quotes/:id changes its header fields and adds, changes or removes its subscriptions, products and lines. Both save through the same process as the quote page: a new quote starts in status 'created', an edit to a quote whose approval has started sends it back for approval, and a quote that is under signing, signed or completed can no longer be changed.","x-displayName":"Quotes"},{"name":"crmOpportunities","kind":"nav","parent":"CRM","description":"An opportunity is a prospective deal in the sales pipeline, tied to a customer or prospect and its quotes.","x-displayName":"Opportunities"},{"name":"crmOpportunityStages","kind":"nav","parent":"CRM","description":"The opportunity stages of a legal entity are the ordered steps its opportunities move through. Every opportunity sits in exactly one stage of its entity.","x-displayName":"Opportunity Stages"},{"name":"fixedAssets","kind":"nav","parent":"accounting","description":"Fixed assets are the assets a business capitalizes and depreciates. Depreciation policies set how they're depreciated, and depreciation schedules record each asset's depreciation. Recording depreciation creates journal entries in the general ledger.","x-displayName":"Fixed Assets"},{"name":"hrAbsenceTypes","kind":"nav","parent":"peopleManagement","description":"An absence type is a kind of leave, such as vacation, sick leave, or overtime.","x-displayName":"Absence Types"},{"name":"hrAbsences","kind":"nav","parent":"peopleManagement","description":"An absence is an employee's leave request over a date range.\n\nEach absence has an absence type. An absence's status shows where the leave request is in the approval process. Possible values: 'requested', 'approved', 'rejected', 'canceled'.","x-displayName":"Absences"},{"name":"hrApplicants","kind":"nav","parent":"peopleManagement","description":"An applicant is a person who applies to a recruitment.\n\nWhen you create an applicant with POST people/applicants, you also create their first application, so the request must include one.","x-displayName":"Applicants"},{"name":"hrApplications","kind":"nav","parent":"peopleManagement","description":"An application records that one person has applied to one recruitment.","x-displayName":"Applications"},{"name":"hrDepartments","kind":"nav","parent":"peopleManagement","description":"A department is a unit in the organization, and it can sit under a parent department in a hierarchy.","x-displayName":"Departments"},{"name":"hrDocumentCategories","kind":"nav","parent":"peopleManagement","description":"A document category is a kind of employee document, such as a work permit or an enrollment certificate.\n\nDocument categories are set up for the whole tenant and contain no personal data.","x-displayName":"Document Categories"},{"name":"hrDocuments","kind":"nav","parent":"peopleManagement","description":"An employee document is a file that belongs to one employee and is filed under one document category.\n\nYou have access only to your own documents and the documents of people you manage. An HR administrator has access to the documents of active employees in the legal entities they administer.","x-displayName":"Documents"},{"name":"hrPeople","kind":"nav","parent":"peopleManagement","description":"The people in the People Management (HR) directory.\n\nEach person has an id and an employee number.","x-displayName":"People"},{"name":"hrPositions","kind":"nav","parent":"peopleManagement","description":"A position is a role in the organization that people are hired into.\n\nEach position is tied to a job profile and a region.","x-displayName":"Positions"},{"name":"invDepreciationPolicies","kind":"nav","parent":"assetManagement","description":"A depreciation policy sets how fixed assets are depreciated in one accounting book.\n\nA policy covers one or more fixed asset types, such as machinery or vehicles. For each type, the policy has a depreciation rule. The rule sets the useful life for fixed assets of that type. The policy also sets a default depreciation method and period length. It sets the accounts that depreciation and disposal journal entries post to. These are the asset, accumulated depreciation, depreciation expense, gain, and loss accounts.\n\nEach book needs its own policies. A policy can be set up for several legal entities. For each fixed asset type, legal entity, and book, only one policy can be active.","x-displayName":"Depreciation Policies"},{"name":"invDepreciationSchedules","kind":"nav","parent":"fixedAssets","description":"A depreciation schedule is the plan for depreciating one fixed asset over its useful life.\n\nA schedule is created when a fixed asset is saved. It uses the useful life from the depreciation rule in the fixed asset's policy. A schedule has a line for each depreciation period, such as each month. Each line has the amount to depreciate and its date. Recording depreciation for the lines creates their journal entries and marks the lines as recorded.\n\nA fixed asset has one schedule or none. A fixed asset whose `depreciationMethod` is 'Bypassed' has no schedule.\n\nThe API returns schedules, not their lines. A schedule's `fixedAssetId` is a different kind of id from the `id` that the fixed asset endpoints use.\n\nIf an asset is recorded in more than one book, each of its fixed assets has its own schedule.","x-displayName":"Depreciation Schedules"},{"name":"invFixedAssetTypes","kind":"nav","parent":"assetManagement","description":"Fixed asset types: the master data a fixed asset is created from, carrying the depreciation defaults it inherits — read one, or walk the collection with structured filters.\n\nA fixed asset type is master data: the template a fixed asset is created from. It carries the depreciation defaults — above all `defaultUsefulLife` — that a new asset inherits, and it is what `typeId` on a fixed asset points at.\n\n**Two read routes, one item schema.** `GET fixed-asset-types/{id}` reads one type and `GET fixed-asset-types` walks the collection with filters in the query string. Both return the same fields, so a caller can move between them without remapping anything. There is no `POST .../search` on this resource: every field it publishes is a URL-safe scalar, so the collection route can already express every query, and adding a search body would duplicate the contract in two places.\n\n**`name` is filterable here, unlike on most resources.** An asset type name is a classification label chosen by whoever configures the module — 'Machinery', 'Vehicles' — not a person, a counterparty or physical property, so it is not identifying data that has to stay out of a query string. It is exact-match only; there is no free-text search on this resource.\n\n**The hierarchy is one level as published here.** `groupId` and `groupName` name the FixedAssetTypeGroup a type belongs to. That group may itself have a parent, and this API does not walk it — a caller needing the full tree reads the groups themselves.\n\n**`defaultUsefulLife` is a count of periods, not an amount and not a duration.** It is read together with the depreciation interval on the asset that inherits it; the number alone does not say whether it means months or years.\n\n**Inactive types are returned by both routes.** `active` is on every response and filterable on the collection: a type is deactivated rather than deleted once assets reference it, and an integration reconciling historical assets still has to resolve the type they point at. Filter `active` when populating a picker.\n\n**Incremental sync** is `filter[lastModifiedDate][gte]=…&sort=lastModifiedDate` on the collection. It tracks the FixedAssetType row only: renaming the group a type belongs to does not move it.\n\nEvery request carries an `Api-Version` header — `v1` — alongside the bearer token. It is required, with no default: a missing or empty header, or one naming a version this company does not have, is answered with 400; a route that exists but not in the requested version is answered with 404.\n\nOne thing to know before writing error handling: a business failure such as `NOT_FOUND` arrives under HTTP 400, not 404, because a route cannot yet declare a status per diagnostic code. Branch on the `code` in the error body.","x-displayName":"Fixed Asset Types"},{"name":"invFixedAssets","kind":"nav","parent":"assetManagement","description":"Fixed assets are the accounting records of the assets a legal entity capitalizes and depreciates.\n\nSome fields describe the asset itself rather than its accounting. They are `name`, `assetStatus`, `assetNumber`, `serialNumber`, `assetTag`, `acquisitionDate`, `departmentId`, and `businessUnitId`. The legal entity that owns the asset, `entityId`, is stored with it too.\n\nImported fixed assets can already be partly depreciated, for example when assets are moved from another system. For these, `depreciationStartValueAmount` is the value that depreciation continues from, and `initialDepreciatedAmount` is the depreciation from before the import.\n\nA company can keep more than one set of books, for example one for local accounting rules and one for group reporting. Each fixed asset belongs to one book, because each book can depreciate the same asset differently. So an asset recorded in both books has two fixed asset records, one in each. For example, a forklift might be depreciated over eight years in the local book and over five years in the group book. Its two fixed assets have different depreciation, but the same `companyAssetId`, name, serial number, and the other fields that describe the asset itself. To find all the fixed assets for one asset, filter `GET fixed-assets` on `companyAssetId`. In Lensing, the fixed assets list shows one book at a time. The API returns the fixed assets of every book together, unless you filter on `bookId`.","x-displayName":"Fixed Assets"},{"name":"inventory","kind":"nav","description":"Inventory: items and the units, warehouses, documents and stock movements that make up inventory management.\n\nItems are the master data. Warehouses, bins and stock levels record where inventory sits, the receipt, shipment and transfer documents move it, and the increase, decrease, transaction and revaluation records account for every change.","x-displayName":"Inventory"},{"name":"inventoryAccountDeterminationRules","kind":"nav","parent":"inventory","description":"An account determination rule tells an inventory document's journal entry which general ledger accounts to use.\n\nWhen an inventory document such as a receipt, shipment, or inventory increase is committed, a journal entry is created for it. Account determination rules decide which general ledger accounts that journal entry uses. Each rule has two parts: the situations it applies to, and the accounts to use in them.\n\nThe situations are described by dimensions. A dimension is something a rule can check about the line being recorded: its legal entity, the accounting book the journal entry is for, the item's type and category, the warehouse location, and the transaction type. Every new rule must have a legal entity and an accounting book. If a rule has no value for one of the other dimensions, it applies to every value of that dimension. For example, a rule with no warehouse location applies to every location.\n\nA line that has no value for a dimension matches only rules that leave that dimension empty. For example, a vendor bill line has no location, so only rules with no location apply to it.\n\nWithin a legal entity, no two rules (including inactive ones) can have the same combination of transaction type, item type, item category, and location.\n\nLeaving dimensions empty lets you start with general rules and add more specific ones where you need different accounts. When several rules match, the most specific one is used. The dimensions count in this order, from most to least:\n\n1. Item type\n2. Item category. A rule for a parent category also matches items in the categories below it, but a rule for the item's own category counts for more.\n3. Warehouse location\n4. Accounting book\n5. Transaction type\n\nWhen two matching rules are equally specific, the one with the lower priority number wins.\n\nFor example, a general rule for 'SHIPMENT' uses cost of goods sold account 5010, and a beverages rule for 'SHIPMENT' and the item category Beverages uses account 5010-BEV. A shipment of a beverage uses the beverages rule, because it is more specific. Every other shipment uses the general rule.\n\nHave a general rule for each combination of legal entity and accounting book: a rule with no item type, item category, or location. Some lines depend on it. For example, a receipt line with no item, such as a service entered only as a description, takes its services-received-not-invoiced account from the general rule. If there is no general rule with that account, the journal entry for the receipt cannot be created.\n\nSome documents can name their own account for part of the journal entry. That account is then used instead of the rule's account:\n\n- An inventory increase or decrease created by manufacturing can have its own offset account, which is used instead of the inventory adjustment gain or loss account.\n- A receipt line for a service or expense entered in the application can have its own account, which is used instead of the expense account.\n- An inventory revaluation with the `costingValuationType` 'directCostCapitalisation' uses its `capitalisationExpenseAccountId` instead of the revaluation gain or loss account.\n\nSix of the accounts can be replaced by a different account when the document line has a reason code: inventory adjustment gain and loss, sales return, goods returned not credited, and purchase return variance gain and loss. These are the rule's reason-code overrides. For example, stock written off as damaged can go to a separate loss account. Reason codes themselves are created and changed with the inventory/reason-codes endpoints.","x-displayName":"Account Determination Rules"},{"name":"inventoryBatchNumbers","kind":"nav","parent":"inventory","description":"A batch number identifies stock of one item that shares an expiry date, a cost, and a quality-control status.\n\nA batch is a quantity of one item, in one warehouse, that shares one batch number. The same batch number on another item or in another warehouse is a separate batch.\n\nBatches are created by these documents:\n\n- A receipt or inventory increase, when it is saved with a batch number that the item does not yet have in that warehouse. The batch's `quantity` stays 0 until the document is committed. A later receipt or inventory increase with the same batch number, item, and warehouse adds to the same batch.\n- An inventory count, when it is saved with a batch number that the item does not yet have in that warehouse. The batch's `quantity` stays 0 until the inventory increase that the count creates for a surplus is committed.\n- A production order, for what it produces, when the order is released.\n- A warehouse transfer, when it is committed, if the receiving warehouse does not already have a batch with that number for the item. The new batch has the same number. Between legal entities, the new batch's cost is the transfer price, not the cost the stock had in the sending warehouse. The transfer price is the transfer line's total in the receiving legal entity's functional currency, divided by the line's quantity in the item's stocking unit.\n\nBatches cannot be deleted. To take a batch out of use, change its `batchStatus` or set `active` to false with PATCH inventory/batch-numbers/:id. You cannot change a batch's `quantity`, `inStock`, `cost`, `originalCost`, or `locationId` with PATCH. Documents that move or revalue stock, such as receipts, shipments, warehouse transfers, and inventory revaluations, change these fields.\n\nA batch is blocked while any of these apply:\n\n- Its `batchStatus` is 'QUARANTINED', 'EXPIRED', or 'DISPOSED'.\n- Its `qcStatus` has a value other than 'PASS'.\n- Its `temperatureBreach` is true.\n\nThe application does not offer a blocked batch for picking, or a batch whose `active` is false. Committing a shipment with POST inventory/shipments/:id/commit fails if a line names a blocked batch. Inventory decreases, warehouse transfers, and purchase returns do not check these values. The stock stays in inventory either way, and a past `expirationDate` alone does not block a batch.","x-displayName":"Batch Numbers"},{"name":"inventoryBatchTransactions","kind":"nav","parent":"inventory","description":"A batch transaction records a quantity of one batch moving into or out of stock, or a change to the batch's cost.\n\nDocuments that change the stock or cost of a batch create batch transactions. To record a stock movement, create and commit the document that moves the stock. To undo a stock movement, cancel the document that recorded it.\n\nEach batch transaction belongs to an inventory transaction, which has the item, warehouse, date, and type of document line. An inventory transaction can have several batch transactions.\n\nA batch transaction records one of these:\n\n- Stock of the batch coming in or going out.\n- An inventory revaluation, which changes the batch's cost without moving stock.\n- A change to the cost of units of the batch that were already sold. This kind has no `inQuantity`, `outQuantity`, `cost`, `valueDelta`, or `currency`.\n\nBatch transactions do not include a breakdown by bin.","x-displayName":"Batch Transactions"},{"name":"inventoryBins","kind":"nav","parent":"inventory","description":"A bin is a place inside a warehouse where stock is kept, such as an aisle, a rack, or a shelf level.\n\nReceipts, shipments, and put-aways record which bin each movement used.\n\nbinCode and barcode are unique within the tenant, not only within one warehouse. A weight or volume limit must be sent with its unit.","x-displayName":"Bins"},{"name":"inventoryInventoryDecreases","kind":"nav","parent":"inventory","description":"An inventory decrease is an adjustment document that removes stock without a sale, such as after breakage, shrinkage, a write-off, or a count that found less stock.\n\nAn inventory decrease is created as a draft and moves no stock until it's committed. A draft can be changed or deleted. A committed inventory decrease can't, and no endpoint cancels it.\n\nOne warehouse location applies to the whole document, and every line takes its stock from that location.\n\nA line can name only batch numbers and serial numbers that its item already has. Name each one by its number or its id. A number is matched against the batch numbers or serial numbers of the line's item. On an updateLines item, a number is matched only when the item also sends itemId, so otherwise name the batch or serial by its id. An unknown number or id returns UNKNOWN_TRACKING_NUMBER.","x-displayName":"Inventory Decreases"},{"name":"inventoryInventoryIncreases","kind":"nav","parent":"inventory","description":"An inventory increase is an adjustment document that adds stock without a purchase, such as a found pallet, an opening balance, or a count that found more stock.\n\nAn inventory increase is created as a draft and adds no stock until it's committed. A draft can be changed or deleted. A committed inventory increase can't, and no endpoint cancels it.\n\nOne warehouse applies to every line of an inventory increase. A line for a batch-tracked item needs batches that add up to the line's quantity. A line for a serialized item needs one serials item per unit, and a line in a bin-tracked warehouse needs binLocations.\n\nbinLocations is one list per line, and each of its items can name the batchNumber or serialNumber it belongs to. A batch number or serial number that the item doesn't have yet is created. Every amount is in the legal entity's functional currency.","x-displayName":"Inventory Increases"},{"name":"inventoryInventoryLevels","kind":"nav","parent":"inventory","description":"An inventory level is the stock of one item at one location. It shows the quantities in stock, available, reserved, and in transit, and their value.\n\nStock movements such as receipts, shipments, counts, and adjustments update each inventory level, and allocations and reservations update its allocated and reserved quantities. There is no endpoint to create, change, or delete a level. To change the stock in a level, commit the document that moves the stock.\n\nA level can exist before any stock has moved, for example when replenishment settings are saved for the item at that location. No level means nothing has been recorded for that item at that location.","x-displayName":"Inventory Levels"},{"name":"inventoryInventoryRevaluations","kind":"nav","parent":"inventory","description":"An inventory revaluation changes the value of stock without changing its quantity.\n\nA revaluation can also add a cost to stock after the stock was received.\n\nA revaluation is created as a draft and changes no value until it's committed. Only a draft can be changed or deleted.\n\nEvery amount on a revaluation is in the legal entity's functional currency.","x-displayName":"Inventory Revaluations"},{"name":"inventoryInventoryTransactions","kind":"nav","parent":"inventory","description":"An inventory transaction records stock of one item coming into or going out of a warehouse. It can also record a change in the value of that stock without any stock moving, such as an inventory revaluation or a landed cost.\n\nDocuments create inventory transactions when they move stock or change the value of stock. These documents include receipts, shipments, sales returns, purchase returns, warehouse transfers, inventory increases, inventory decreases, and inventory revaluations. To record a stock movement, create and commit the document that moves the stock.\n\nTo undo a stock movement, cancel the document that recorded it. Canceling does not delete the document's inventory transactions. Instead, the cancellation creates a new inventory transaction for each one, moving the same quantity in the opposite direction, with `inQuantity` and `outQuantity` swapped. The new inventory transactions are dated with the cancellation date, so the original ones keep their dates.\n\nEach batch transaction and serial transaction belongs to one inventory transaction, and its `transactionId` is the `id` of that inventory transaction. One inventory transaction can have several batch transactions or serial transactions.\n\nTo see how much of an item is in stock now, use GET inventory/inventory-levels.","x-displayName":"Inventory Transactions"},{"name":"inventoryItemAttributeDefinitions","kind":"nav","parent":"inventory","description":"An item attribute definition is a descriptive property a tenant defines for itself — Colour, Size, Material — together with the values it allows.\n\nAn attribute definition names something you want to describe items by, and owns the values it permits. 'Colour' with Red, Green and Blue is one definition and three values.\n\nThis is what inventory/item-attributes assigns. An item cannot be tagged with an attribute that does not exist, so a tenant setting Everest up by API creates its attributes here first and assigns them afterwards.\n\nvalueType is TEXT or NUMBER and it is a promise about the values: a NUMBER attribute refuses a value that is not a number, because the node stores every value as text and nothing further down would notice.\n\nName is unique within the tenant. Creating or renaming onto a name that already exists fails with DUPLICATE_NAME rather than producing a second attribute nothing can tell apart.\n\nDeleting an attribute that items still carry fails with IN_USE — its assignments would be left pointing at nothing. Remove those first.","x-displayName":"Item Attribute Definitions"},{"name":"inventoryItemAttributes","kind":"nav","parent":"inventory","description":"An item attribute is one descriptive tag on an item — the attribute that was chosen, such as Colour, and the value it was given, such as Red.\n\nItem attributes describe an item in terms a tenant defines for itself. An attribute definition names the thing being described ('Colour') and owns the values it allows ('Red', 'Green'); an item attribute is one item carrying one of those values.\n\nThis is a resource of its own rather than a field on the item. An item is a flat record of scalars and every scalar GET inventory/items/:id returns is also on its list row, so a nested collection there would be the first exception to that shape. inventory/inventory-levels is the same arrangement: a child of an item, published flat and scoped with an itemId filter.\n\nA value belongs to exactly one attribute. Assigning Colour's 'Red' under a Size attribute fails with VALUE_MISMATCH rather than storing a link nothing can render.\n\nNothing constrains an item to one value per attribute, so reading an item's attributes may legitimately return the same attribute more than once. Changing an assignment is a delete followed by a create — an assignment is only the item, the attribute and the value, so there is nothing else in it to patch.","x-displayName":"Item Attributes"},{"name":"inventoryItemCategories","kind":"nav","parent":"inventory","description":"An item category is a group of similar items. Categories can contain other categories.\n\nItem categories are used for reporting, replenishment, and analytics.\n\nEvery item belongs to exactly one item category.\n\nparentId places a category under its parent. Moving a category with PATCH inventory/item-categories/:id can't make the tree deeper than 6 levels. Filtering items by a category with POST inventory/items/search includes every category beneath it. Moving a category to a new parent also moves every category beneath it, and no item changes.\n\nNo endpoint searches categories by free text.","x-displayName":"Item Categories"},{"name":"inventoryItemTypes","kind":"nav","parent":"inventory","description":"An item type classifies items and decides whether items of that type may be kept in stock.\n\nstockable decides whether items of the type may be kept in stock. Under a non-stockable type, an item must have isInventory set to false. procurable records whether items of the type are meant to be bought, and purchase documents don't check it. Every item has one item type and can't change it.\n\nThere is no endpoint to create, change, or delete an item type.","x-displayName":"Item Types"},{"name":"inventoryItems","kind":"nav","parent":"inventory","description":"An item is something you stock, sell, or buy.\n\nInventory documents refer to items. A receipt brings items in, a shipment sends them out, an inventory level is the stock of one item at one location, and a landed cost spreads a charge over the items on a receipt.\n\nitemCode is unique within the tenant. An item's valuation method must match its tracking: 'batch' requires isBatch, and 'serials' requires isSerial.","x-displayName":"Items"},{"name":"inventoryLandedCostItems","kind":"nav","parent":"inventory","description":"A landed cost item decides which vendor bill charges, such as freight, duty, insurance, and handling, can be added to the value of received stock (capitalized), and how each charge is spread over the receipt lines.\n\nA landed cost item is a setting, not a line of a landed cost or an item in your stock. It decides which vendor bill charges count as landed costs and how they are handled. You set it up once, not for each shipment. To stop a landed cost item from matching vendor bill lines, set its `active` to false or delete it.\n\nEach landed cost item says:\n\n- Which vendor bill lines it covers: lines whose item matches its `itemId`, such as a freight service item, or whose general ledger account matches its `accountId`, such as a freight expense account.\n- How to spread (allocate) the charges over the receipt lines, in `allocationMode`.\n- Which costing element type the inventory revaluations get when a landed cost is committed, in `costingElementTypeId`.\n\n`allocationMode` can be:\n\n- 'Equal': evenly per line.\n- 'Quantity': by the quantity received.\n- 'LineTotal': by what the goods cost.\n- 'Weight': by weight. Every selected receipt line's item needs a gross weight, weight, or net weight. When an item has more than one, the gross weight is used, then the weight, then the net weight.\n- 'Volume': by volume. Every selected receipt line's item needs a volume per unit, or every one needs a length, width, and height.\n\nCreating or updating a landed cost fails when a selected receipt line's item is missing what its allocation mode needs. A value of zero or less counts as missing. 'Volume' uses one kind of volume for all the items: either every item has a volume per unit, or every item has a length, width, and height. For example, the request fails when one item records only a volume per unit and another records only its length, width, and height. Before the charge is spread, weights and volumes are converted to one unit. Each item's weight is converted to kilograms with its `weightUnit`, and each volume per unit to cubic metres with its `volumeUnit`. So an item weighed in pounds and an item weighed in kilograms are compared by their real weight. If an item's `weightUnit` is empty, its weight is read as kilograms. If its `volumeUnit` is empty, its volume per unit is read as cubic metres. Length, width, and height have no unit field, so they are multiplied as recorded. Record them in the same unit, such as centimetres, on every item, or the charge is spread incorrectly. See `weightUnit` and `volumeUnit` on GET inventory/items/:id (getItem).\n\nFor example, a landed cost item for freight covers the freight expense account and spreads by 'Weight'. When a freight bill is approved, its line appears on GET inventory/landed-costs/vendor-bill-lines with 'Weight' as its `allocationMode`. You add the line to a landed cost. When you commit the landed cost, its inventory revaluation gets the freight costing element type.\n\nA charge sent to POST inventory/landed-costs without `allocationMode` does not use the mode set here. It uses the item's own default allocation mode, or 'Equal'.","x-displayName":"Landed Cost Items"},{"name":"inventoryLandedCosts","kind":"nav","parent":"inventory","description":"A landed cost adds the extra costs of getting stock to you, such as freight, customs duty, insurance, and handling, to the value of that stock. The charges come from approved vendor bills, and the stock from committed receipts.\n\nStock comes in on a receipt at its purchase price, and the extra costs are often billed later, on separate vendor bills. A landed cost spreads (allocates) those charges over the lines of committed receipts, so the stock's value includes them. The quantity of the stock does not change. Landed cost items decide which vendor bill lines a landed cost can use.\n\nA landed cost is created as a draft. A draft can be changed or deleted, and its allocation shows how the charges are spread. Committing the landed cost raises the cost of the units still in stock by their share of the charges. For units already sold, their share goes to their after-sale cost instead. The commit does this through inventory revaluations, which it creates and commits. A committed landed cost cannot be changed or deleted, and it has no cancel action.\n\nEvery amount on a landed cost is in the functional currency of its legal entity, and is not converted.","x-displayName":"Landed Costs"},{"name":"inventoryPurchaseReturns","kind":"nav","parent":"inventory","description":"A purchase return sends goods you received back to the vendor, for example because they were damaged, wrong, or more than you ordered. It is the opposite of a sales return.\n\nA purchase return records goods you received that you send back to the vendor. Each line takes a quantity of one item out of one warehouse. A line can name the receipt line or the purchase order line it draws on: the line the goods were originally received or ordered on. The returned quantity counts against what is still returnable on that line. You can create a purchase return from scratch, or from a purchase order with POST inventory/purchase-returns/from-purchase-order.\n\nA purchase return goes through these steps:\n\n- It is created with the `documentStatus` 'DRAFT'. Stock does not change.\n- Approving it sets 'APPROVED'. Stock does not change.\n- Shipping it sets 'COMMITTED'. The stock leaves the warehouse, the returned quantity is recorded on the receipt lines, and a journal entry is created in the general ledger. Shipping a purchase return does not create a shipment.\n- Canceling it sets 'CANCELLED' and puts the stock back in the warehouse.\n\nThe statuses 'PREPARED', 'SHIPPED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', and 'COMPLETED' are set in the application.\n\nA purchase return does not create batches or serial numbers. A line for a batch-tracked or serialized item names the batches or serialized units that already exist. Purchase returns do not check a batch's `batchStatus`, `qcStatus`, or `temperatureBreach`.","x-displayName":"Purchase Returns"},{"name":"inventoryReasonCodes","kind":"nav","parent":"inventory","description":"A reason code explains why a manual inventory adjustment or return happened.\n\nInventory increases, inventory decreases, inventory revaluations, purchase returns, and sales returns name a reason code. Each reason code is linked to the document types it can be selected on: 'InventoryIncrease', 'InventoryDecrease', 'SalesReturn', 'PurchaseReturn', and 'Disposal'.","x-displayName":"Reason Codes"},{"name":"inventoryReceipts","kind":"nav","parent":"inventory","description":"A receipt records goods or services that arrive from a vendor.\n\nThe vendor bill is matched against the receipt later. The Reference API has no endpoint for that matching.\n\nEach line has a lineType: Inventory, Service, or Expense. An Inventory line needs an item, a unit, a warehouse, and a quantity. A Service or Expense line needs a description, an amount, and a general ledger account, and has no item or warehouse.\n\nEvery amount is in the vendor's currency, which can differ from the legal entity's functional currency. Each line also has functionalUnitPrice and functionalLineTotal in the functional currency.","x-displayName":"Receipts"},{"name":"inventorySalesReturns","kind":"nav","parent":"inventory","description":"A sales return records goods that a customer sends back.\n\nA sales return is created as a draft. Committing it brings the goods back into stock and sets documentStatus to 'RECEIVED'. No other step of a return's workflow has an endpoint, and documentStatus can't be set directly.\n\nEach line says what came back and where it goes. condition and disposition describe the goods. sourceDocumentLineId is the shipment line the goods went out on, from a line's id on GET inventory/shipments/:id. With it, the commit values the return at the original shipment cost.\n\nA return is valued in the currency it was sold in, which can differ from the legal entity's functional currency.","x-displayName":"Sales Returns"},{"name":"inventorySerialNumbers","kind":"nav","parent":"inventory","description":"A serial number identifies one physical unit of an item and records its stock and cost.\n\nA serial number record is one unit of an item, identified by its serial number.\n\nSerial number records are created by these documents:\n\n- A receipt or inventory increase, when it is saved with a new serial number. The serial number record's `inStock` is 0 until the document is committed.\n- An inventory count, when it records a unit that has no serial number record.\n- A production order, for the units it produces, when the order is released.\n- A warehouse transfer between legal entities, in the receiving legal entity. The serial number record in the sending legal entity is kept. The unit comes into the receiving legal entity at the transfer price. The transfer price is the transfer line's total in the receiving legal entity's functional currency, divided by the line's quantity in the item's stocking unit.\n\nA serial number record is not deleted when its unit leaves stock. After a shipment, for example, the serial number record has `inStock` 0 and `isSold` true.\n\nIf the unit comes back later, the same serial number record is used again. What happens to its cost depends on how the unit comes back:\n\n- Returned: a customer sends the unit back on a sales return, or you cancel the shipment. The unit's `originalCost` does not change. A sales return also sets `isSold` back to false.\n- Received as new stock: you buy the unit back on a receipt, for example as a trade-in, or you find a unit you wrote off and add it back with an inventory increase. The unit's `originalCost` is set to the cost on that document, `afterSaleCost` is cleared, and `isSold` becomes false.\n\nSerial number records cannot be deleted. To take a unit out of use, set `active` to false with PATCH inventory/serial-numbers/:id. You cannot change a unit's `cost`, `originalCost`, `afterSaleCost`, `inStock`, `isSold`, or `locationId` with PATCH. Documents that move or revalue stock, such as receipts, shipments, warehouse transfers, and inventory revaluations, change these fields.\n\nIn the application, a unit whose `active` is false is not offered for picking. Documents created through the API do not check `active`, so check it yourself before you name a unit on a shipment or other outbound document.\n\nA unit has its own `cost` and `originalCost` only when its item's `valuationMethod` is 'serials'. See `valuationMethod` on GET inventory/items/:id (getItem).","x-displayName":"Serial Numbers"},{"name":"inventorySerialTransactions","kind":"nav","parent":"inventory","description":"A serial transaction records one serialized unit moving into or out of stock, or a change to the unit's cost.\n\nDocuments that change the stock or cost of a serialized unit create serial transactions. To record a stock movement, create and commit the document that moves the stock. To undo a stock movement, cancel the document that recorded it.\n\nEach serial transaction belongs to an inventory transaction, which has the item, warehouse, date, and type of document line. An inventory transaction can have several serial transactions, one for each unit.\n\nA serial transaction records one of these:\n\n- The unit coming into stock or going out.\n- A change to the unit's cost without stock moving, such as an inventory revaluation.\n\nThe item, warehouse, and date are those of the inventory transaction. They do not show where the unit is now. To see where a unit is now, use GET inventory/serial-numbers/:id.","x-displayName":"Serial Transactions"},{"name":"inventoryShipmentCarriers","kind":"nav","parent":"inventory","description":"A shipment carrier is the freight or delivery company named on an outbound shipment.\n\nCarrier names aren't unique, so use id to identify a carrier.","x-displayName":"Shipment Carriers"},{"name":"inventoryShipments","kind":"nav","parent":"inventory","description":"A shipment records goods going out to a customer. You create it as a draft, then commit it to send the goods and record the cost of sale in a journal entry.\n\nThrough this API, a shipment is 'DRAFT' until it's committed, and 'DELIVERED' after. The packing process can set it to 'PACKED' before it's committed.\n\nOther parts of the application, such as invoicing, sales returns, and cancellation, can set documentStatus to 'SHIPPED', 'PARTIALLY_SHIPPED', 'COMMITTED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', or 'PARTIALLY_RETURNED'. No endpoint on this page sets these statuses.","x-displayName":"Shipments"},{"name":"inventoryUnitOfMeasureGroups","kind":"nav","parent":"inventory","description":"A unit of measure group is a set of units of measure that convert to one base unit of measure.\n\nA group has a conversion line for each of its units of measure, giving the number of base units in one of that unit. The base unit's own line has a factor of 1. For example, a group based on 'EA' might have 'BOX' at 12 and 'PALLET' at 480.\n\nItems are assigned to a group, and an item's inventory, sales, and purchase units must be units in that group.","x-displayName":"Unit of Measure Groups"},{"name":"inventoryUnitOfMeasures","kind":"nav","parent":"inventory","description":"A unit of measure is a unit that items are stocked, purchased, and sold in, with a code and a display name, such as 'KG' for 'Kilogram'.\n\nItems and the lines of unit of measure groups refer to units of measure. A unit of measure group converts between the units of measure in it.","x-displayName":"Units of Measure"},{"name":"inventoryWarehouseTransferOrders","kind":"nav","parent":"inventory","description":"A warehouse transfer order is a request to move a quantity of items from one warehouse to another.\n\nA transfer order moves nothing itself. Converting the order creates a draft warehouse transfer, and the stock moves when that transfer is committed. On this resource, commit means converting the order.\n\nAn order's status comes from its lines, and no endpoint sets it directly. 'DRAFT' is a new order, 'IN_TRANSFER' has an uncommitted transfer, 'PARTIALLY_PROCESSED' still has open quantity after a transfer, and 'PROCESSED' has nothing open. Canceling a transfer in Lensing returns its quantity to the order and reopens the order. This API has no endpoint to cancel a transfer.\n\nAn order has quantities but no amounts. The warehouse transfer values the stock.","x-displayName":"Warehouse Transfer Orders"},{"name":"inventoryWarehouseTransfers","kind":"nav","parent":"inventory","description":"A warehouse transfer is a document that moves stock from one warehouse to another, within one legal entity or between two.\n\nA transfer starts as a draft, which moves nothing and can be changed or deleted. Committing the transfer moves the goods from the source warehouse to the target warehouse and creates a journal entry. A committed transfer can't be changed or deleted, and there is no endpoint to cancel one.\n\nAn intercompany transfer, with transferType 'INTERCOMPANY', sells the goods from one legal entity to another. The intercompany bill is created separately, after the commit, and billing can't be undone. billingStatus shows whether a transfer has been billed.\n\nOn each line, a batch-tracked item needs batches that add up to the line's quantity, and a serialized item needs one serial number per unit. Each bin location on a line names both the source bin and the target bin, and the batch or serial number the bin location belongs to, when there is one.","x-displayName":"Warehouse Transfers"},{"name":"inventoryWarehouses","kind":"nav","parent":"inventory","description":"A warehouse is a stocking location where a legal entity keeps inventory.\n\nStock records, bins, inventory transactions, inventory counts, and allocations each belong to a warehouse. A warehouse's locationCode is unique within the tenant.\n\nTo retire a warehouse, set isActive to false. Inventory transactions and other records that refer to a retired warehouse are kept.","x-displayName":"Warehouses"},{"name":"peopleManagement","kind":"nav","description":"Records for managing the workforce: people and their teams, positions, absences and absence types, employee documents and their categories, and the hiring pipeline of recruitments, applicants, and applications.","x-displayName":"People Management"},{"name":"peopleRecruitments","kind":"nav","parent":"peopleManagement","description":"A recruitment is one job opening.\n\nA recruitment belongs to a department, a position, or both. A recruitment can also name a team, a work location, an employment category, and the legal entity that will employ the hire. A hiring manager and a recruitment owner run each recruitment.\n\nThree fields are set for you, and a request can't change them. status comes from the deadline, published changes when the recruitment is published externally, and recruitmentNumber comes from a number range.","x-displayName":"Recruitments"},{"name":"peopleTeams","kind":"nav","parent":"peopleManagement","description":"A team is a named group in the organization, placed in a hierarchy of parent and child teams.\n\nA team has a name, a type, a lifespan, and an optional parent team. Its status comes from its start and end dates, and no endpoint sets it directly. A new team's name must be unique.\n\nA team's members are separate records. There is no endpoint to add or remove a team's members.","x-displayName":"Teams"},{"name":"psa-activities","kind":"nav","parent":"PSA","description":"An activity is a task on a PSA project.\n\nEach activity has its own billing, budget, dates, and status. You can read activities but not change them: there is no endpoint to create, change, delete, or copy an activity.","x-displayName":"Activities"},{"name":"psa-allocations","kind":"nav","parent":"PSA","description":"An allocation is planned hours for a team member or placeholder on an activity over a date range.\n\nEach allocation's planned hours are spread over its working days as daily entries. Some errors from creating, updating, or deleting allocations are generic errors without a named code.","x-displayName":"Allocations"},{"name":"psa-expenses","kind":"nav","parent":"PSA","description":"An expense is a cost recorded on a PSA project and can be assigned to one of the project's expense budgets.\n\nYou can read expenses but not change them: there is no endpoint to create, change, or delete an expense or an expense budget, or to assign an expense to an expense budget.","x-displayName":"Expenses"},{"name":"psa-fixed-fees","kind":"nav","parent":"PSA","description":"A fixed fee is a billable amount on a PSA project, billed once or on a recurring schedule.\n\nYou can read fixed fees but not change them: there is no endpoint to create, change, or delete a fixed fee.","x-displayName":"Fixed Fees"},{"name":"psa-milestones","kind":"nav","parent":"PSA","description":"A milestone is a billable checkpoint on a PSA project, with its own amount, due date, and status.\n\nYou can read milestones but not change them: there is no endpoint to create, change, delete, or invoice a milestone.","x-displayName":"Milestones"},{"name":"psa-placeholders","kind":"nav","parent":"PSA","description":"A placeholder is a stand-in for a person, used to plan the staffing of PSA projects before a real person is assigned.\n\nPlaceholder names are unique within the tenant. A placeholder is not tied to one PSA project. Add a placeholder to a project's team with POST psa/team-members/bulk, and replace it with a person with POST psa/team-members/assign-placeholder.","x-displayName":"Placeholders"},{"name":"psa-positions","kind":"nav","parent":"PSA","description":"A position is a billable role on a PSA project, with its own bill rate, cost rate, and budgeted hours.\n\nA position can refer to a People Management position, which is a separate record. There is no endpoint to create, change, delete, or copy a position.","x-displayName":"Positions"},{"name":"psa-project-types","kind":"nav","parent":"PSA","description":"A project type is a label that categorizes PSA projects.\n\nProject type names are unique within the tenant.","x-displayName":"Project Types"},{"name":"psa-projects","kind":"nav","parent":"PSA","description":"A PSA project is a professional services engagement that a team plans, staffs, and budgets.\n\n","x-displayName":"Projects"},{"name":"psa-team-members","kind":"nav","parent":"PSA","description":"A team member is a person on a PSA project's team, and a position assignment links a person or placeholder to one of the project's positions.\n\nA person can be a team member without a position assignment. A placeholder on a project's team appears only as a position assignment, never as a team member.","x-displayName":"Team Members"},{"name":"psa-time-entries","kind":"nav","parent":"PSA","description":"A time entry is the hours a team member records for an activity on one date.\n\nEach request changes only the time entries you name. There is no endpoint that saves a whole timesheet week. To save an edited week, create the new time entries, update the changed ones, and delete the removed ones.\n\nA time entry's submissionStatus starts at 'draft' and moves to 'pending' when you submit it, then to 'approved' or 'rejected'. An approved time entry becomes 'submittedForInvoicing' and then 'invoiced' as it is billed. No endpoint sets submissionStatus directly.","x-displayName":"Time Entries"},{"name":"taxDocumentManualTaxableDocuments","kind":"nav","parent":"taxDocuments","description":"The manual taxable documents of the tax document package: the invoices and credits an entity records by hand for tax compliance, and what is still open on them. Also known as ad hoc documents. Sits under Tax Documents. Being a group it carries no targets, no catalog entry and no path segment of its own — the routes stay at tax-documents/manual-taxable-documents.","x-displayName":"Manual Taxable Documents"},{"name":"taxDocuments","kind":"nav","parent":"accounting","description":"Everything the tax document package exposes over the public API: the manual taxable documents an entity records for tax compliance. Sits under Accounting, beside the other domains of that module. Being a group it carries no targets, no catalog entry and no path segment of its own.","x-displayName":"Tax Documents"}]}